Skip to content

Commit 99276c7

Browse files
committed
fix: refactor shouldHaveSingleInstancePerWholeApp property initialization in AdminForthPlugin
1 parent 1ee165d commit 99276c7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

adminforth/basePlugin.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default class AdminForthPlugin implements IAdminForthPlugin {
2020
resourceConfig: AdminForthResource;
2121
className: string;
2222
activationOrder: number = 0;
23+
shouldHaveSingleInstancePerWholeApp?: () => boolean;
2324

2425
constructor(pluginOptions: any, metaUrl: string) {
2526
// set up plugin here
@@ -28,6 +29,7 @@ export default class AdminForthPlugin implements IAdminForthPlugin {
2829
this.pluginOptions = pluginOptions;
2930
afLogger.trace(`🪲 🪲 AdminForthPlugin.constructor ${this.constructor.name}`);
3031
this.className = this.constructor.name;
32+
this.shouldHaveSingleInstancePerWholeApp = () => false;
3133
}
3234

3335
setupEndpoints(server: any) {
@@ -38,9 +40,6 @@ export default class AdminForthPlugin implements IAdminForthPlugin {
3840
return 'non-uniquely-identified';
3941
}
4042

41-
shouldHaveSingleInstancePerWholeApp(): boolean {
42-
return false;
43-
}
4443

4544
modifyResourceConfig(adminforth: IAdminForth, resourceConfig: AdminForthResource, allPluginInstances?: {pi: AdminForthPlugin, resource: AdminForthResource}[]) {
4645
this.resourceConfig = resourceConfig;

0 commit comments

Comments
 (0)