From: Kosta Harlan Date: Thu, 28 Jun 2018 14:22:54 +0000 (-0400) Subject: RC Filters: Check if app is initialized before calling change tags X-Git-Tag: 1.34.0-rc.0~4927^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=bb15314f1b50b088594fe4eed5e0f26583a3ab92;p=lhc%2Fweb%2Fwiklou.git RC Filters: Check if app is initialized before calling change tags This only occurs when highlighting is enabled in the query parameters on page load. If you load a watchlist page with highlighting enabled, you'll see that FilterTagMultiselectWidget calls the parent onChangeTags method, and then we end up at updateIfHeightChanged where a resize event occurs. This commit checks to see if the app is still initializing before propagating this event. Bug: T198399 Change-Id: I8d36875ecf859b40854fe57fecf824e648bb3bf8 --- diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js index 907c5354a1..c7db7c6592 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js @@ -388,8 +388,10 @@ * @inheritdoc */ mw.rcfilters.ui.FilterTagMultiselectWidget.prototype.onChangeTags = function () { - // Parent method - mw.rcfilters.ui.FilterTagMultiselectWidget.parent.prototype.onChangeTags.call( this ); + // If initialized, call parent method. + if ( this.controller.isInitialized() ) { + mw.rcfilters.ui.FilterTagMultiselectWidget.parent.prototype.onChangeTags.call( this ); + } this.emptyFilterMessage.toggle( this.isEmpty() ); };