From dbaed4fe3d88d4a9874f842fa37be2211555904e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20St=C3=BCrmer?= Date: Mon, 5 Dec 2016 16:04:48 +0100 Subject: [PATCH] Enforce a minimal context size of 0 --- src/core_plugins/kibana/public/context/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core_plugins/kibana/public/context/app.js b/src/core_plugins/kibana/public/context/app.js index a56f270485aa5..634982999b007 100644 --- a/src/core_plugins/kibana/public/context/app.js +++ b/src/core_plugins/kibana/public/context/app.js @@ -11,6 +11,7 @@ const module = uiModules.get('apps/context', [ 'kibana', 'ngRoute', ]); +const MIN_CONTEXT_SIZE = 0; module.directive('contextApp', function ContextApp() { return { @@ -74,7 +75,7 @@ function ContextAppController($q, config, es) { ]); }, setSize: (size) => { - this.size = size; + this.size = Math.max(size, MIN_CONTEXT_SIZE); return this.actions.fetchContextRows(); }, };