Skip to content

Commit

Permalink
Merge pull request #126 from RationAI/fix/loader
Browse files Browse the repository at this point in the history
fix: attach instance to a module subset, not the MODULES object itself
  • Loading branch information
Aiosa authored Feb 28, 2025
2 parents dd7712c + 99bf338 commit 1d42b76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ function initXOpatLoader(PLUGINS, MODULES, PLUGINS_FOLDER, MODULES_FOLDER, POST_
}
staticContext.__self = this;

MODULES.instance = this;
MODULES[id].instance = this;

// Await event necessary to fire after instantiation, do in async context
setTimeout(() => VIEWER.tools.raiseAwaitEvent(VIEWER, 'module-singleton-created', {
Expand Down

0 comments on commit 1d42b76

Please sign in to comment.