From c5adeecd902389ef04d5377bdb0d35c3df438cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Fri, 12 Nov 2021 12:23:27 +0100 Subject: [PATCH] :bug: Fix problems importing files --- common/src/app/common/path/bool.cljc | 3 ++- common/src/app/common/types/interactions.cljc | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/app/common/path/bool.cljc b/common/src/app/common/path/bool.cljc index ddb3880915..8269c1e287 100644 --- a/common/src/app/common/path/bool.cljc +++ b/common/src/app/common/path/bool.cljc @@ -42,7 +42,8 @@ (let [head-p (gsp/command->point head) head (cond (and (= :close-path (:command head)) - (< (gpt/distance last-p last-move) 0.01)) + (or (nil? last-p) ;; Ignore consecutive close-paths + (< (gpt/distance last-p last-move) 0.01))) nil (= :close-path (:command head)) diff --git a/common/src/app/common/types/interactions.cljc b/common/src/app/common/types/interactions.cljc index 7c56113ad1..3f54ee2a81 100644 --- a/common/src/app/common/types/interactions.cljc +++ b/common/src/app/common/types/interactions.cljc @@ -69,8 +69,7 @@ (defmulti action-opts-spec :action-type) (defmethod action-opts-spec :navigate [_] - (s/keys :req-un [::destination] - :opt-un [::preserve-scroll])) + (s/keys :opt-un [::destination ::preserve-scroll])) (defmethod action-opts-spec :open-overlay [_] (s/keys :req-un [::destination @@ -87,7 +86,7 @@ ::background-overlay])) (defmethod action-opts-spec :close-overlay [_] - (s/keys :req-un [::destination])) + (s/keys :opt-un [::destination])) (defmethod action-opts-spec :prev-screen [_] (s/keys :req-un []))