-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Not a navigator: [object Object] cljs.core/MetaFn #312
Comments
This looks to be a bug. The fix might be as simple as extending the ImplicitNav protocol to |
I have the same error, doing basically the same thing (trying to replace all keyword values within an arbitrarily nested structure. I'm working in CLJC, and it works on the CLJ side but not the CLJS. |
I have searched in vain for the example you are talking about, in which the implicitnav function is extended. Can you link where that is done, @nathanmarz ? |
I'm a newbie to programming with protocols and types, so feel pretty clumsy. I can't locate a definition of (extend-type #?(:clj clojure.lang.AFn :cljs cljs.core/MetaFn)
com.rpl.specter.protocols/ImplicitNav
(implicit-nav [this] (pred this))) |
Ah, found pred. specter/src/clj/com/rpl/specter.cljc Line 1210 in d0d6fdf
|
adding the following did indeed fix the issue, so my function now works in both clj and cljs: (ns foo
(:require [com.rpl.specter :as s]
[com.rpl.specter.protocols]))
(extend-type #?(:clj clojure.lang.AFn :cljs cljs.core/MetaFn)
com.rpl.specter.protocols/ImplicitNav
(implicit-nav [this] (s/pred this))) |
Got the following error in CLJS when the path wasn't in a vector
|
I'm trying to write a function to replace all instances of a value in a data structure with another value.
Specter is black magic to me, so I started from an example and ended up with this:
It works as I expect in Clojure,
Yields,
However, in ClojureScript, I get
I thought my data structures in ClojureScript contained something surprising, but it's the case for this as well:
Am I doing something weird in the above function?
The text was updated successfully, but these errors were encountered: