check for scope.opts.timefield, return early if missing

Fixes #5509
This commit is contained in:
Joe Fleming 2015-11-25 15:53:52 -07:00 committed by Joe Fleming
parent 59d559eb6d
commit a76b18a8d0

View file

@ -191,6 +191,9 @@ define(function (require) {
});
$scope.$watch('vis.aggs', function () {
// no timefield, no vis, nothing to update
if (!$scope.opts.timefield) return;
var buckets = $scope.vis.aggs.bySchemaGroup.buckets;
if (buckets && buckets.length === 1) {