You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by bo...@apache.org on 2019/03/06 02:31:39 UTC
[kylin] branch master updated: KYLIN-3842 kylinProperties.js Unable
to get the public configuration of the first line in the front end
This is an automated email from the ASF dual-hosted git repository.
boblu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/master by this push:
new 0234301 KYLIN-3842 kylinProperties.js Unable to get the public configuration of the first line in the front end
0234301 is described below
commit 0234301b68a3dab8952be2be4f51cb5c66043c48
Author: yuzhang <sh...@163.com>
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("=");