mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-09-24 19:00:26 +00:00
Prevent conflicts with predefined names
Bug: 64896 Change-Id: I67ea669a074317f44eb09cf759c0121bad259b3c
This commit is contained in:
parent
996f0d07d7
commit
cf74f4e0a0
|
@ -5,6 +5,8 @@
|
|||
/*global alert */
|
||||
( function ( $, mw ) {
|
||||
|
||||
var hasOwn = Object.prototype.hasOwnProperty;
|
||||
|
||||
$.wikiEditor.modules.dialogs.config = {
|
||||
|
||||
replaceIcons: function ( $textarea ) {
|
||||
|
@ -167,7 +169,7 @@ $.wikiEditor.modules.dialogs.config = {
|
|||
}
|
||||
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 @@ $.wikiEditor.modules.dialogs.config = {
|
|||
}
|
||||
|
||||
var cache = $( this ).data( 'suggcache' );
|
||||
if ( typeof cache[title] !== 'undefined' ) {
|
||||
if ( hasOwn.call( cache, title ) ) {
|
||||
$( this ).suggestions( 'suggestions', cache[title] );
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue