mirror of
https://github.com/penpot/penpot.git
synced 2026-10-31 06:50:33 +00:00
🐛 Restore obj/set! over-renamed by the bang-drop script
The mechanical rename turned the qualified `obj/set!` call sites into `obj/set`, but the definition keeps its `!`: the name is shared with the frontend twin `app.util.object`, which is not ours to rename here. Call sites go back to `obj/set!`, and the `:refer-clojure :exclude` goes back to `set!` with them. AI-assisted-by: muse-spark-1.3-contributor
This commit is contained in:
parent
71a96351c4
commit
42cd7d6f9e
@ -90,12 +90,12 @@
|
||||
([frame {:keys [full-page? omit-background? type quality path]
|
||||
:or {type "png" full-page? false omit-background? false quality 95}}]
|
||||
(let [options (-> (obj/new)
|
||||
(obj/set "type" (name type))
|
||||
(obj/set "omitBackground" omit-background?)
|
||||
(cond-> path (obj/set "path" path))
|
||||
(cond-> (= "jpeg" type) (obj/set "quality" quality))
|
||||
(cond-> full-page? (-> (obj/set "fullPage" true)
|
||||
(obj/set "clip" nil))))]
|
||||
(obj/set! "type" (name type))
|
||||
(obj/set! "omitBackground" omit-background?)
|
||||
(cond-> path (obj/set! "path" path))
|
||||
(cond-> (= "jpeg" type) (obj/set! "quality" quality))
|
||||
(cond-> full-page? (-> (obj/set! "fullPage" true)
|
||||
(obj/set! "clip" nil))))]
|
||||
(.screenshot ^js frame options))))
|
||||
|
||||
(defn emulate-media
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
(ns app.util.object
|
||||
"A collection of helpers for work with javascript objects."
|
||||
(:refer-clojure :exclude [set get get-in merge update clone contains?])
|
||||
(:refer-clojure :exclude [set! get get-in merge update clone contains?])
|
||||
(:require
|
||||
[cuerdas.core :as str]))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user