fix getting default rpc host error when access AriaNg by opening file directly

This commit is contained in:
MaysWind 2016-08-01 22:18:00 +08:00
parent 042e5040f7
commit 86199cca05
2 changed files with 8 additions and 1 deletions

View file

@ -9,6 +9,7 @@
languagePath: '/langs',
languageFileExtension: '.json',
defaultLanguage: 'en',
defaultHost: 'localhost',
globalStatStorageCapacity: 120,
taskStatStorageCapacity: 300,
lazySaveTimeout: 500,

View file

@ -32,7 +32,13 @@
};
var getDefaultRpcHost = function () {
return $location.$$host;
var currentHost = $location.$$host;
if (currentHost) {
return currentHost;
}
return ariaNgConstants.defaultHost;
};
var setOptions = function (options) {