mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Correct decorateWidget error checking logic (#24036)
`name` referred to `window.name`, so the mistake wasn't detected by eslint 🤦♂️
This commit is contained in:
@@ -41,11 +41,11 @@ export function deleteFromRegistry(name) {
|
||||
const _decorators = {};
|
||||
|
||||
export function decorateWidget(widgetName, cb) {
|
||||
if (!_registry[name]) {
|
||||
if (!_registry[widgetName]) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(
|
||||
consolePrefix(),
|
||||
`decorateWidget: Could not find widget '${name}' in registry`
|
||||
`decorateWidget: Could not find widget '${widgetName}' in registry`
|
||||
);
|
||||
}
|
||||
_decorators[widgetName] ??= [];
|
||||
|
||||
Reference in New Issue
Block a user