Skip to content

Commit 37fe9de

Browse files
authored
fix(js/core/registry): log error with duplicate action key (#3021)
1 parent 0ad9d7d commit 37fe9de

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

js/core/src/registry.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,8 @@ export class Registry {
291291
const key = `/${type}/${action.__action.name}`;
292292
logger.debug(`registering ${key}`);
293293
if (this.actionsById.hasOwnProperty(key)) {
294-
// TODO: Make this an error!
295-
logger.warn(
296-
`WARNING: ${key} already has an entry in the registry. Overwriting.`
294+
logger.error(
295+
`ERROR: ${key} already has an entry in the registry. Overwriting.`
297296
);
298297
}
299298
this.actionsById[key] = action;
@@ -318,9 +317,8 @@ export class Registry {
318317
const key = `/${type}/${name}`;
319318
logger.debug(`registering ${key} (async)`);
320319
if (this.actionsById.hasOwnProperty(key)) {
321-
// TODO: Make this an error!
322-
logger.warn(
323-
`WARNING: ${key} already has an entry in the registry. Overwriting.`
320+
logger.error(
321+
`ERROR: ${key} already has an entry in the registry. Overwriting.`
324322
);
325323
}
326324
this.actionsById[key] = action;

0 commit comments

Comments
 (0)