I'm probably doing something wrong, but I find that there are some problems in one of the om-next tutorials ; in particular, an example of autocomplete. I managed to find out one of the problems , but there is another problem that causes me some problems.
As soon as I put more than two letters in the input field for autocomplete, the following code:
(defn send-to-chan [c]
(fn [{:keys [search]} cb]
(when search
(let [{[search] :children} (om/query->ast search)
query (get-in search [:params :query])]
(put! c [query cb])))))
produces the following error:
Uncaught TypeError: Cannot read property 'call' of undefined
core.js?zx=3jufl8vymlgw [452] om_tutorial.core.send_to_chan
next.js [3034] om.next.Reconciler.om$next$protocols$IReconciler$send_BANG_$arity$1
protocols.js [303] om$next$protocols$send_BANG_
next.js [1656] anonymous
I am not sure why this is so.
Any help would be greatly appreciated.
source
share