This is an automated email from the ASF dual-hosted git repository.
shaofengshi pushed a commit to branch 2.5.x
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/2.5.x by this push:
new a280db2 KYLIN-3842 kylinProperties.js Unable to get the public
configuration of the first line in the front end
a280db2 is described below
commit a280db22b7235ec231b54b82e1f109a6803edad4
Author: yuzhang <[email protected]>
AuthorDate: Wed Mar 6 09:28:34 2019 +0800
KYLIN-3842 kylinProperties.js Unable to get the public configuration of the
first line in the front end
---
webapp/app/js/services/kylinProperties.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/webapp/app/js/services/kylinProperties.js
b/webapp/app/js/services/kylinProperties.js
index 5b64f7a..3c7a66f 100644
--- a/webapp/app/js/services/kylinProperties.js
+++ b/webapp/app/js/services/kylinProperties.js
@@ -31,10 +31,12 @@ KylinApp.service('kylinConfig', function (AdminService,
$log) {
};
this.getProperty = function (name) {
- if(angular.isUndefined(_config)){
+ if(angular.isUndefined(name)
+ || name.length === 0
+ || angular.isUndefined(_config)){
return '';
}
- var keyIndex = _config.indexOf('\n' + name + '=');
+ var keyIndex = _config.indexOf(name + '=');
var keyLength = name.length;
var partialResult = _config.substr(keyIndex);
var preValueIndex = partialResult.indexOf("=");