From 307cfa287f1963d58b52d7426f5d800e7abccbc8 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 12 Sep 2023 16:30:15 +0200 Subject: [PATCH] :fire: Remove inneficient obj/without helper --- frontend/src/app/main/ui/shapes/shape.cljs | 4 +++- frontend/src/app/util/object.cljs | 10 ---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/frontend/src/app/main/ui/shapes/shape.cljs b/frontend/src/app/main/ui/shapes/shape.cljs index 67fa2785c5..f369b1afba 100644 --- a/frontend/src/app/main/ui/shapes/shape.cljs +++ b/frontend/src/app/main/ui/shapes/shape.cljs @@ -87,7 +87,9 @@ wrapper-props (-> (obj/clone props) - (obj/without ["shape" "children" "disable-shadows?"]) + (obj/unset! "shape") + (obj/unset! "children") + (obj/unset! "disable-shadows?") (obj/set! "ref" ref) (obj/set! "id" (dm/fmt "shape-%" shape-id)) (obj/set! "style" styles)) diff --git a/frontend/src/app/util/object.cljs b/frontend/src/app/util/object.cljs index a70728760d..bb5d24fcc7 100644 --- a/frontend/src/app/util/object.cljs +++ b/frontend/src/app/util/object.cljs @@ -8,7 +8,6 @@ "A collection of helpers for work with javascript objects." (:refer-clojure :exclude [set! new get get-in merge clone contains? array?]) (:require - ["lodash/omit" :as omit] [cuerdas.core :as str])) (defn array? @@ -48,15 +47,6 @@ (rest keys) (unchecked-get res key)))))) -#_:clj-kondo/ignore -(defn without - [obj keys] - (let [keys (cond - (vector? keys) (into-array keys) - (array? keys) keys - :else (throw (js/Error. "unexpected input")))] - (omit obj keys))) - (defn clone [a] (js/Object.assign #js {} a))