Use slice instead of substring per code conventions

Change-Id: I5de8b485d287db097f2ad63a7edf75f86a86822d
This commit is contained in:
Derk-Jan Hartman 2016-09-26 21:34:37 +02:00
parent 8375c57a6c
commit fbdad82b99

View file

@ -100,7 +100,7 @@ ve.ui.MWAceEditorWidget.prototype.teardown = function () {
*/
ve.ui.MWAceEditorWidget.prototype.setupEditor = function () {
var basePath = mw.config.get( 'wgExtensionAssetsPath', '' );
if ( basePath.substring( 0, 2 ) === '//' ) {
if ( basePath.slice( 0, 2 ) === '//' ) {
// ACE uses web workers, which have importScripts, which don't like relative links.
basePath = window.location.protocol + basePath;
}