diff --git a/modules/ve-mw/dm/models/ve.dm.MWMediaResourceProvider.js b/modules/ve-mw/dm/models/ve.dm.MWMediaResourceProvider.js index bef33e331a..9427a47881 100644 --- a/modules/ve-mw/dm/models/ve.dm.MWMediaResourceProvider.js +++ b/modules/ve-mw/dm/models/ve.dm.MWMediaResourceProvider.js @@ -24,9 +24,9 @@ ve.dm.MWMediaResourceProvider = function VeDmMWMediaResourceProvider( apiurl, co // Fetching configuration this.scriptDirUrl = config.scriptDirUrl; - this.isLocal = config.local; + this.isLocal = ( 'local' in config ); - if ( config.local ) { + if ( this.isLocal ) { this.setAjaxSettings( { url: mw.util.wikiScript( 'api' ), // If the url is local use json diff --git a/modules/ve-mw/dm/models/ve.dm.MWMediaResourceQueue.js b/modules/ve-mw/dm/models/ve.dm.MWMediaResourceQueue.js index 7c073ffc09..b33855846e 100644 --- a/modules/ve-mw/dm/models/ve.dm.MWMediaResourceQueue.js +++ b/modules/ve-mw/dm/models/ve.dm.MWMediaResourceQueue.js @@ -75,7 +75,7 @@ ve.dm.MWMediaResourceQueue.prototype.setup = function () { ve.dm.MWMediaResourceQueue.prototype.getFileRepos = function () { var defaultSource = [ { url: mw.util.wikiScript( 'api' ), - local: true + local: '' } ]; if ( !this.fileRepoPromise ) {