Skip to content

Commit

Permalink
Merge pull request #34 from modos189/fix/plugin_event
Browse files Browse the repository at this point in the history
Fix plugin_event event: updating a disabled plugin now does not trigger the event
  • Loading branch information
modos189 authored Sep 18, 2024
2 parents 89d2c36 + 73df82f commit 9dc7c01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lib-iitc-manager",
"version": "1.9.0",
"version": "1.9.1",
"description": "Library for managing IITC plugins",
"main": "src/index.js",
"type": "module",
Expand Down
5 changes: 5 additions & 0 deletions src/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,11 @@ export class Worker {
} else if (useUser) {
plugins[uid] = plugin_user || {};
}

// Updating a disabled plugin should not trigger the event
if (event !== 'remove' && plugins[uid]?.status !== 'on') {
delete plugins[uid];
}
}

if (Object.keys(plugins).length) {
Expand Down

0 comments on commit 9dc7c01

Please sign in to comment.