From 80e07f86acbce86dbb9b713a4ee0e8ee9b690b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Wed, 21 Dec 2022 13:29:30 +0100 Subject: [PATCH] refactor(editor): Make `null` no longer conditionally displayed (#4993) :zap: Make `null` no longer conditionally displayed --- packages/editor-ui/src/mixins/expressionManager.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/editor-ui/src/mixins/expressionManager.ts b/packages/editor-ui/src/mixins/expressionManager.ts index df0f265613..b604cf8fda 100644 --- a/packages/editor-ui/src/mixins/expressionManager.ts +++ b/packages/editor-ui/src/mixins/expressionManager.ts @@ -119,14 +119,12 @@ export const expressionManager = mixins(workflowHelpers).extend({ * _part_ of the result, but displayed when they are the _entire_ result. * * Example: - * - Expression `This is a {{ null }} test` is displayed as `This is a test`. - * - Expression `{{ null }}` is displayed as `[Object: null]`. + * - Expression `This is a {{ [] }} test` is displayed as `This is a test`. + * - Expression `{{ [] }}` is displayed as `[Array: []]`. * * Conditionally displayed segments: - * - `[Object: null]` * - `[Array: []]` * - `[empty]` (from `''`, not from `undefined`) - * - `null` (from `NaN`) * * Exceptionally, for two segments, display differs based on context: * - Date is displayed as @@ -157,9 +155,8 @@ export const expressionManager = mixins(workflowHelpers).extend({ this.segments.length > 1 && s.kind === 'resolvable' && typeof s.resolved === 'string' && - (['[Object: null]', '[Array: []]'].includes(s.resolved) || - s.resolved === this.$locale.baseText('expressionModalInput.empty') || - s.resolved === this.$locale.baseText('expressionModalInput.null')) + (s.resolved === '[Array: []]' || + s.resolved === this.$locale.baseText('expressionModalInput.empty')) ) { return false; }