[indexPattern] handle index patterns without fields

This commit is contained in:
spalger 2016-01-22 11:27:45 -07:00 committed by Stéphane Campinas
parent 062931a3f4
commit 9d70208f56

View file

@ -310,7 +310,7 @@ export default function IndexPatternFactory(Private, timefilter, Notifier, confi
};
self._fetchFields = function () {
const existingFieldsByName = self.fields.byName;
const existingFieldsByName = _.get(self, 'fields.byName', {});
return mapper.getFieldsForIndexPattern(self, true)
.then(function (fields) {