Skip to content

Commit b68bd71

Browse files
committed
Fix disabling plugin when denying API
1 parent 913f405 commit b68bd71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/native_apis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function getModule(module_name: string, plugin_id: string, plugin: PluginOrDevTo
164164
}, 20);
165165
} else if (result == Result.Deny && options.optional === false && "toggleDisabled" in plugin) {
166166
setTimeout(() => {
167-
plugin.toggleDisabled();
167+
if (!plugin.disabled) plugin.toggleDisabled();
168168
}, 20);
169169
}
170170
if (!(result == Result.Once || result == Result.Always)) {

0 commit comments

Comments
 (0)