fixing compilation of grunt

This commit is contained in:
Gabriel Nepomuceno
2016-12-09 21:53:00 +00:00
parent f3ebd2d849
commit a8ae0a5b79
8 changed files with 29 additions and 24 deletions

View File

@ -130,14 +130,8 @@ export class DataProcessor {
let fields = [];
var firstItem = dataList[0];
if (firstItem.type === 'docs'){
if (firstItem.datapoints.length === 0) {
return [];
}
let fieldParts = [];
function getPropertiesRecursive(obj) {
let fieldParts = [];
function getPropertiesRecursive(obj) {
_.forEach(obj, (value, key) => {
if (_.isObject(value)) {
fieldParts.push(key);
@ -150,8 +144,11 @@ export class DataProcessor {
}
});
fieldParts.pop();
}
if (firstItem.type === 'docs'){
if (firstItem.datapoints.length === 0) {
return [];
}
getPropertiesRecursive(firstItem.datapoints[0]);
return fields;
}