jenkins-bot has submitted this change and it was merged.

Change subject: Do not reset an option that has no reset method
......................................................................


Do not reset an option that has no reset method

The placeholder method has no reset, skip it when resetting the
options.

Change-Id: I4936c5c9dde870b574b035384abcdf0b746d9b4a
---
M modules/ooui/mw.echo.ui.NotificationsWidget.js
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ooui/mw.echo.ui.NotificationsWidget.js 
b/modules/ooui/mw.echo.ui.NotificationsWidget.js
index 9403b12..0c1c95a 100644
--- a/modules/ooui/mw.echo.ui.NotificationsWidget.js
+++ b/modules/ooui/mw.echo.ui.NotificationsWidget.js
@@ -133,7 +133,9 @@
                        items = this.getItems();
 
                for ( i = 0, len = items.length; i < len; i++ ) {
-                       items[i].reset();
+                       if ( items[i] && typeof items[i].reset === 'function' ) 
{
+                               items[i].reset();
+                       }
                }
        };
 

-- 
To view, visit https://gerrit.wikimedia.org/r/242395
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4936c5c9dde870b574b035384abcdf0b746d9b4a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to