X Tutup
Skip to content

Commit fe10b06

Browse files
authored
Fix: JS Map needs a set call rather than assignment (getredash#3464)
1 parent e35f2b8 commit fe10b06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/app/components/DynamicComponent.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const componentsRegistry = new Map();
66
const activeInstances = new Set();
77

88
export function registerComponent(name, component) {
9-
if (isString(name) && (name !== '')) {
10-
componentsRegistry[name] = isFunction(component) ? component : null;
9+
if (isString(name) && name !== '') {
10+
componentsRegistry.set(name, isFunction(component) ? component : null);
1111
// Refresh active DynamicComponent instances which use this component
1212
activeInstances.forEach((dynamicComponent) => {
1313
if (dynamicComponent.props.name === name) {

0 commit comments

Comments
 (0)
X Tutup