From 3c6327c6612969b07a4e472b6eecb003a4cd3a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20=C3=81ngel?= Date: Thu, 16 May 2019 11:41:29 +0200 Subject: [PATCH] Fix condition --- server/lib/elastic-wrapper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/elastic-wrapper.js b/server/lib/elastic-wrapper.js index bc6bcf0c1..aab0cfdcc 100644 --- a/server/lib/elastic-wrapper.js +++ b/server/lib/elastic-wrapper.js @@ -294,7 +294,7 @@ export class ElasticWrapper { // Ensure '@timestamp' field is always excluded, >= 7.0.0 is using 'timestamp' try { const idx = currentFields.map(item => item.name).indexOf('@timestamp'); - if (idx || idx === 0) { + if (idx > -1) { currentFields[idx].excluded = true; } } catch (error) {} // eslint-disable-line