 
       :component-will-unmount
       (fn [this]
-        (.removeEventListener (:input @nodes) "keydown" arrow-handler)
+        (when-let [i (:input @nodes)]
+          (.removeEventListener i "keydown" arrow-handler))
         (.removeEventListener (:focus-node @nodes) "keydown" outer-key-handler)
         (.removeEventListener js/document "click" doc-click-listener))
 

     {:component-did-mount
      (fn [this]
        (swap! nodes assoc :root-node (r/dom-node this))
        (.addEventListener (:input @nodes) "keydown" arrow-handler)
        (.addEventListener (:focus-node @nodes) "keydown" outer-key-handler)
        (.addEventListener js/document "click" doc-click-listener)
        (when-let [focus-node (and (:auto-focus props) (:focus-node @nodes))]

     :overflow-y :auto
     :border "1px solid #ddd"}
    [:&.no-input
     {:top (u/px+ 10 (+ 16 (* h 1.5)))
      :bottom :unset}]
    [:.no-results
     {:text-align :center
      :padding (u/px 10)
