Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/130566
Change subject: Prevent conflicts with names of predefined methods and properties ...................................................................... Prevent conflicts with names of predefined methods and properties Change-Id: I67ea669a074317f44eb09cf759c0121bad259b3c --- M modules/jquery.wikiEditor.dialogs.config.js 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiEditor refs/changes/66/130566/1 diff --git a/modules/jquery.wikiEditor.dialogs.config.js b/modules/jquery.wikiEditor.dialogs.config.js index 533bc65..e8b451c 100644 --- a/modules/jquery.wikiEditor.dialogs.config.js +++ b/modules/jquery.wikiEditor.dialogs.config.js @@ -5,6 +5,8 @@ /*global alert */ ( function ( $, mw ) { +var hasOwn = Object.prototype.hasOwnProperty; + $.wikiEditor.modules.dialogs.config = { replaceIcons: function ( $textarea ) { @@ -167,7 +169,7 @@ } var target = $( '#wikieditor-toolbar-link-int-target' ).val(); var cache = $( '#wikieditor-toolbar-link-int-target-status' ).data( 'existencecache' ); - if ( cache[target] ) { + if ( hasOwn.call( cache, target ) ) { updateWidget( cache[target] ); return; } @@ -396,7 +398,7 @@ } var cache = $(this).data( 'suggcache' ); - if ( typeof cache[title] !== 'undefined' ) { + if ( hasOwn.call( cache, title ) { $(this).suggestions( 'suggestions', cache[title] ); return; } -- To view, visit https://gerrit.wikimedia.org/r/130566 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I67ea669a074317f44eb09cf759c0121bad259b3c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiEditor Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader <gerritpatchuploa...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits