We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tutorial shows the example implementation and we can find there:
show() { ... modifiers: [ ...options.modifiers, { name: 'eventListeners', enabled: true }, ]
options.modifiers is an array, so the above code keeps on adding new object at each call of show().
options.modifiers
show()
The same mistake is in hide() function.
hide()
You should change it to something like that:
function enableListeners(modifiers, value) { const modifier = modifiers.find((x) => x.name === 'eventListeners'); if (!modifier) return [...modifiers, { name: 'eventListeners', enabled: open }]; modifier.enabled = value; return modifiers; } show() { ... modifiers: enableListeners(options.modifiers, true) ...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Tutorial shows the example implementation and we can find there:
options.modifiers
is an array, so the above code keeps on adding new object at each call ofshow()
.The same mistake is in
hide()
function.You should change it to something like that:
The text was updated successfully, but these errors were encountered: