You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: adminforth/index.ts
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -116,6 +116,7 @@ class AdminForth implements IAdminForth {
116
116
connectorClasses: any;
117
117
runningHotReload: boolean;
118
118
activatedPlugins: Array<AdminForthPlugin>;
119
+
pluginsById: Record<string,AdminForthPlugin>={};
119
120
configValidator: IConfigValidator;
120
121
restApi: AdminForthRestAPI;
121
122
@@ -256,6 +257,13 @@ class AdminForth implements IAdminForth {
256
257
thrownewError(`Attempt to activate Plugin ${pluginInstance.constructor.name} second time for same resource, but plugin does not support it.
257
258
To support multiple plugin instance pre one resource, plugin should return unique string values for each installation from instanceUniqueRepresentation`);
258
259
}
260
+
constpluginId=pluginInstance.pluginOptions?.id;
261
+
if(pluginId){
262
+
if(this.pluginsById[pluginId]){
263
+
thrownewError(`Plugin with id "${pluginId}" already exists!`);
0 commit comments