Skip to content

Commit

Permalink
CLJS-3337: REPL, Regression for :reload
Browse files Browse the repository at this point in the history
REPL was using goog.object. Instead use low-level JS macros.
  • Loading branch information
swannodette committed Nov 29, 2021
1 parent 5a8dd27 commit 02b450a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/clojure/cljs/repl/bootstrap.clj
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
;; check for new-ish private goog/debugLoader
(if (some? goog/debugLoader_)
(let [path (.getPathFromDeps_ goog/debugLoader_ src)]
(goog.object/remove (.-written_ goog/debugLoader_) path)
(goog.object/remove (.-written_ goog/debugLoader_)
(cljs.core/js-delete (.-written_ goog/debugLoader_) path)
(cljs.core/js-delete (.-written_ goog/debugLoader_)
(str js/goog.basePath path)))
;; legacy approach
(let [path (goog.object/get js/goog.dependencies_.nameToPath src)]
(goog.object/remove js/goog.dependencies_.visited path)
(goog.object/remove js/goog.dependencies_.written path)
(goog.object/remove js/goog.dependencies_.written
(let [path (cljs.core/unchecked-get js/goog.dependencies_.nameToPath src)]
(cljs.core/js-delete js/goog.dependencies_.visited path)
(cljs.core/js-delete js/goog.dependencies_.written path)
(cljs.core/js-delete js/goog.dependencies_.written
(str js/goog.basePath path)))))
(let [ret (.require__ js/goog src)]
(when (= reload "reload-all")
Expand Down

0 comments on commit 02b450a

Please sign in to comment.