From ef9339f6f1b18d5c1cea8b2837447dc36af413d3 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 14 Feb 2022 12:42:35 +0100 Subject: [PATCH] :bug: Fix unexpected exception on handling empty state on boolean calc --- CHANGES.md | 7 +++++++ common/src/app/common/path/bool.cljc | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 03e16ee971..6476caeb8f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,12 @@ # CHANGELOG +## 1.11.2-beta + +### :bug: Bugs fixed + +- Fix issue on handling empty content on boolean shapes. + + ## 1.11.1-beta ### :bug: Bugs fixed diff --git a/common/src/app/common/path/bool.cljc b/common/src/app/common/path/bool.cljc index 8b6a66cf5a..543a60b13a 100644 --- a/common/src/app/common/path/bool.cljc +++ b/common/src/app/common/path/bool.cljc @@ -326,6 +326,9 @@ [bool-type contents] ;; We apply the boolean operation in to each pair and the result to the next ;; element - (->> contents - (reduce (partial content-bool-pair bool-type)) - (into []))) + (if (seq contents) + (->> contents + (reduce (partial content-bool-pair bool-type)) + (into [])) + [])) +