Skip to content
New issue

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

Filter out false menu items #69

Merged
merged 1 commit into from
May 29, 2019
Merged

Filter out false menu items #69

merged 1 commit into from
May 29, 2019

Conversation

medusalix
Copy link
Contributor

Expressions such as options.showInspectElement && defaultActions.inspect() evaluate to false when the respective option is disabled and lead to an exception when creating the menu template. This can be prevented by filtering false items in the function removeUnusedMenuItems.

Fixes #68

@sindresorhus sindresorhus changed the title Filter false menu items Filter out false menu items May 29, 2019
@sindresorhus sindresorhus merged commit 2529d65 into sindresorhus:master May 29, 2019
@medusalix medusalix deleted the fix-menu-items branch May 29, 2019 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

showInspectElement: false Causes unhandled exception
2 participants