mirror of
https://github.com/penpot/penpot.git
synced 2025-07-22 10:07:14 +02:00
⚡ Add minor optimizations to tab-container react component
This commit is contained in:
parent
e0a1cd6e77
commit
eeaee5ad42
7 changed files with 48 additions and 43 deletions
|
@ -34,3 +34,13 @@
|
|||
(.push ^js a v1 v2 v3 v4 v5 v6)
|
||||
a))
|
||||
|
||||
(defn normalize-to-array
|
||||
"If `o` is an array, returns it as-is, if not, wrap into an array."
|
||||
[o]
|
||||
(if (array? o)
|
||||
o
|
||||
#js [o]))
|
||||
|
||||
(defn without-nils
|
||||
[^js/Array o]
|
||||
(.filter o (fn [v] (some? v))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue