Skip to content

Instantly share code, notes, and snippets.

@darwin
Created November 9, 2019 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darwin/f4704eb6f0b65ea28a38351a10b451b6 to your computer and use it in GitHub Desktop.
Save darwin/f4704eb6f0b65ea28a38351a10b451b6 to your computer and use it in GitHub Desktop.
02bb9ad async: work around warning about "setImmediate_ is not public" 49 minutes ago antonin@hildebrand.cz
diff --git a/src/lib/devtools/async.cljs b/src/lib/devtools/async.cljs
index 93caca8..5fd5b09 100644
--- a/src/lib/devtools/async.cljs
+++ b/src/lib/devtools/async.cljs
@@ -1,6 +1,6 @@
(ns devtools.async
(:require-macros [devtools.oops :refer [oset ocall]])
- (:require [goog.async.nextTick :as next-tick]
+ (:require [goog.async.nextTick]
[goog.labs.userAgent.browser :as ua]
[devtools.context :as context]))
@@ -30,11 +30,11 @@
nil)
(defn install-async-set-immediate! []
- (set! *original-set-immediate* next-tick/setImmediate_)
- (set! next-tick/setImmediate_ promise-based-set-immediate))
+ (set! *original-set-immediate* js/goog.async.nextTick.setImmediate_)
+ (set! js/goog.async.nextTick.setImmediate_ promise-based-set-immediate))
(defn uninstall-async-set-immediate! []
- (set! next-tick/setImmediate_ *original-set-immediate*))
+ (set! js/goog.async.nextTick.setImmediate_ *original-set-immediate*))
; -- installation -----------------------------------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment