We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
graft' relies on
Since 0.6.0 nested non-cursor components fail because *cursor* is nil.
0.6.0
*cursor*
Using non-cursors like this might not be very intuitive, nevertheless I have a situation comparable to the following in my application:
(ns om-error.core (:require [om.core :as om :include-macros true] [om.dom :as dom :include-macros true])) (enable-console-print!) (defn inner [[a b] owner] (reify om/IRender (render [this] (println "inner" om.core/*cursor*) (dom/div nil (dom/h1 nil a) (dom/h1 nil b))))) (defn widget [data foo owner] (reify om/IRender (render [this] ;; *cursor* is nil because `data' isn't a cursor(?) (println "widget" om.core/*cursor*) ;; fails because the [data ...] part is wrapped by graft which ;; relies on *cursor*, which is nil here (om/build inner [data "non-cursor"])))) (defn main [state owner] (reify om/IRender (render [this] (println "main" om.core/*cursor*) ;; :text is a string (om/build widget (:text state))))) (om/root main {:text "Hello world!"} {:target (. js/document (getElementById "widget"))})
*cursor* is a valid cursor in main, nil in widget. This leads to an error when calling build for inner as om.core/graft relies on *cursor*.
main
nil
widget
build
inner
om.core/graft
The text was updated successfully, but these errors were encountered:
Thanks for the report will look into it.
Sorry, something went wrong.
This ticket will be resolved by #135.
fixed in master
No branches or pull requests
Since
0.6.0
nested non-cursor components fail because*cursor*
is nil.Using non-cursors like this might not be very intuitive, nevertheless I have a situation comparable to the following in my application:
*cursor*
is a valid cursor inmain
,nil
inwidget
. This leads to an error when callingbuild
forinner
asom.core/graft
relies on*cursor*
.The text was updated successfully, but these errors were encountered: