From 9a4028c61fcb18303a10178d4696f7273077962f Mon Sep 17 00:00:00 2001 From: Trevor Parscal Date: Wed, 5 Jun 2013 16:19:41 -0700 Subject: [PATCH] Tolerate JSON stringify screwing up Sometimes the notices come through as an object with numeric keys. Go figure. Change-Id: I3246006afe74a9c34a0cdd5294de61691bc37a43 --- modules/ve/init/mw/ve.init.mw.Target.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ve/init/mw/ve.init.mw.Target.js b/modules/ve/init/mw/ve.init.mw.Target.js index a2812e70c5..7eeba0e191 100644 --- a/modules/ve/init/mw/ve.init.mw.Target.js +++ b/modules/ve/init/mw/ve.init.mw.Target.js @@ -195,7 +195,7 @@ ve.init.mw.Target.onNoticesReady = function () { document.body.appendChild( tmp ); // Merge locally and remotely generated notices - noticeHtmls = this.remoteNotices.slice( 0 ); + noticeHtmls = Array.prototype.slice.call( this.remoteNotices ); for ( i = 0, len = this.localNoticeMessages.length; i < len; i++ ) { noticeHtmls.push( '

' + ve.init.platform.getParsedMessage( this.localNoticeMessages[i] ) + '

'