From 29e0e5a0baaa2d892cf2262b5e6dcd124eadc2b8 Mon Sep 17 00:00:00 2001 From: Julien Richard Date: Tue, 6 Apr 2021 22:10:41 +0200 Subject: [PATCH] [api] Fix stix data builder from input --- opencti-platform/opencti-graphql/src/database/stix.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencti-platform/opencti-graphql/src/database/stix.js b/opencti-platform/opencti-graphql/src/database/stix.js index f1ca84785418..480d66761dd2 100644 --- a/opencti-platform/opencti-graphql/src/database/stix.js +++ b/opencti-platform/opencti-graphql/src/database/stix.js @@ -105,7 +105,7 @@ const isDefinedValue = (element, diffMode) => { if (diffMode) return true; // If not in diff mode, we only take into account none empty element const isArray = Array.isArray(element); - if (isArray) return isArray.length > 0; + if (isArray) return element.length > 0; // If not array, check if empty return !R.isEmpty(element); }