Skip to content

Commit 9e9fd9a

Browse files
committed
Fix showing Inspect Element menu item
1 parent 4d28a12 commit 9e9fd9a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ const create = (win, options) => {
138138
inspect: () => ({
139139
id: 'inspect',
140140
label: 'Inspect Element',
141-
enabled: isDev,
142141
click() {
143142
win.inspectElement(props.x, props.y);
144143

@@ -155,6 +154,8 @@ const create = (win, options) => {
155154
})
156155
};
157156

157+
const shouldShowInspectElement = typeof options.showInspectElement === 'boolean' ? options.showInspectElement : isDev;
158+
158159
let menuTemplate = [
159160
defaultActions.separator(),
160161
options.showLookUpSelection !== false && defaultActions.lookUpSelection(),
@@ -170,7 +171,7 @@ const create = (win, options) => {
170171
defaultActions.separator(),
171172
defaultActions.copyLink(),
172173
defaultActions.separator(),
173-
options.showInspectElement && defaultActions.inspect(),
174+
shouldShowInspectElement && defaultActions.inspect(),
174175
options.showServices && defaultActions.services(),
175176
defaultActions.separator()
176177
];

0 commit comments

Comments
 (0)