Mooeypoo has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/242395

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/95/242395/1

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: newchange
Gerrit-Change-Id: I4936c5c9dde870b574b035384abcdf0b746d9b4a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <[email protected]>

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

Reply via email to