Use slice instead of substring per code conventions

Change-Id: Id9b08270c377f2b31486dbdb9492b77860f436e7
This commit is contained in:
Derk-Jan Hartman 2016-09-26 21:36:53 +02:00
parent 9018acb6fe
commit 46d76471e1

View file

@ -329,7 +329,7 @@
box = context.$textarea; box = context.$textarea;
lang = mw.config.get( 'wgCodeEditorCurrentLanguage' ); lang = mw.config.get( 'wgCodeEditorCurrentLanguage' );
basePath = mw.config.get( 'wgExtensionAssetsPath', '' ); 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. // ACE uses web workers, which have importScripts, which don't like relative links.
// This is a problem only when the assets are on another server, so this rewrite should suffice // This is a problem only when the assets are on another server, so this rewrite should suffice
// Protocol relative // Protocol relative