Skip to content

Commit

Permalink
fix(plugins): retain instance context when calling entry funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
pylixonly committed Sep 8, 2024
1 parent 1f6d5ce commit 5449969
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/debug/safeMode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export async function toggleSafeMode({
const enabled = BunnySettings.general.safeModeEnabled = to;
const currentColor = ColorManager.getCurrentManifest();
await ColorManager.writeForNative(enabled ? null : currentColor);
if (reload) setTimeout(RTNBundleUpdaterManager.reload, 500);
if (reload) setTimeout(() => RTNBundleUpdaterManager.reload(), 500);
}
4 changes: 2 additions & 2 deletions src/lib/addons/plugins/PluginManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ export default {
const ret = typeof raw === "function" ? raw() : raw;
const rawInstance = ret?.default ?? ret ?? {};
pluginInstance = {
start: rawInstance.onLoad,
stop: rawInstance.onUnload,
start: () => rawInstance.onLoad(),
stop: () => rawInstance.onUnload(),
SettingsComponent: rawInstance.settings
};

Expand Down

0 comments on commit 5449969

Please sign in to comment.