Skip to content

Commit bf3716e

Browse files
committed
Add warning for duplicate base plugins
1 parent 6ed5e6f commit bf3716e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/plugin/src/WidgetView.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useMemo } from 'react';
2+
import Log from '@deephaven/log';
23
import usePlugins from './usePlugins';
34
import {
45
isWidgetPlugin,
@@ -8,6 +9,8 @@ import {
89
} from './PluginTypes';
910
import { createChainedComponent } from './PluginUtils';
1011

12+
const log = Log.module('@deephaven/plugin.WidgetView');
13+
1114
export type WidgetViewProps = {
1215
/** Fetch function to return the widget */
1316
fetch: () => Promise<unknown>;
@@ -33,6 +36,8 @@ export function WidgetView({ fetch, type }: WidgetViewProps): JSX.Element {
3336
foundMiddleware.push(p);
3437
} else if (foundBasePlugin == null) {
3538
foundBasePlugin = p;
39+
} else {
40+
log.warn(`Multiple base plugins for type ${type}, ignoring ${p.name}`);
3641
}
3742
});
3843

0 commit comments

Comments
 (0)