Fomafix has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/361642 )
Change subject: Replace deprecated jQuery.isArray by Array.isArray
......................................................................
Replace deprecated jQuery.isArray by Array.isArray
jQuery.isArray gets deprecated in jQuery 3.2.0. [1]
Array.isArray is part of ES5 and MediaWiki 1.29+ which ensures that
JavaScript is only used when the browser supports ES5. (T128115)
Array.isArray is supported since the following browser versions: [2]
* Chrome 5
* Firefox (Gecko) 4.0 (2.0)
* Internet Explorer 9
* Opera 10.5
* Safari 5
Also change
new Array( ... )
to
[ ... ]
[1] https://blog.jquery.com/2017/03/16/jquery-3-2-0-is-out/
[2]
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#Browser_compatibility
Change-Id: If3e0d90649c5cfba66c36b258a906e5912ec6e6f
---
M modules/tools/ext.cx.tools.link.js
1 file changed, 2 insertions(+), 2 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation
refs/changes/42/361642/1
diff --git a/modules/tools/ext.cx.tools.link.js
b/modules/tools/ext.cx.tools.link.js
index f2d0607..9bc502f 100644
--- a/modules/tools/ext.cx.tools.link.js
+++ b/modules/tools/ext.cx.tools.link.js
@@ -62,8 +62,8 @@
return deferred.resolve( {} ).promise();
}
- if ( !$.isArray( titles ) ) {
- titles = new Array( titles );
+ if ( !Array.isArray( titles ) ) {
+ titles = [ titles ];
}
if ( language === mw.cx.sourceLanguage ) {
--
To view, visit https://gerrit.wikimedia.org/r/361642
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If3e0d90649c5cfba66c36b258a906e5912ec6e6f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Fomafix <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits