This is an automated email from the ASF dual-hosted git repository.
shaofengshi pushed a commit to branch 2.6.x
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/2.6.x by this push:
new 2eb044e KYLIN-3842 kylinProperties.js Unable to get the public
configuration of the first line in the front end
2eb044e is described below
commit 2eb044ec0fc61f68f5de2d080f645feeaf122290
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("=");