Skip to content

A platform for community discussion. Free, open, simple.

REFACTOR: removes superfluous argument passed to findWidget (#9669)

Joffrey JAFFEUX48375db84801
diff --git a/app/assets/javascripts/discourse/app/widgets/glue.js b/app/assets/javascripts/discourse/app/widgets/glue.js
index 2fe75def260..78aa33196b6 100644
--- a/app/assets/javascripts/discourse/app/widgets/glue.js
+++ b/app/assets/javascripts/discourse/app/widgets/glue.js
@@ -58,11 +58,11 @@ export default class WidgetGlue {
widget.vnode.children.forEach(child => {
if (child.constructor.name === "CustomWidget") {
widgets.push(child);
- findWidgets(child, widgets);
+ findWidgets(child);
}
});
};
- findWidgets(this._tree, widgets);
+ findWidgets(this._tree);
widgets.reverse().forEach(widget => widget.destroy());
cancel(this._timeout);