       (throw (js/Error. "conj! after persistent!"))))
 
   (-persistent! [tcoll]
-    (if (.-edit root)
+    (if ^boolean (.-edit root)
       (do (set! (.-edit root) nil)
           (let [len (- cnt (tail-off tcoll))
                 trimmed-tail (make-array len)]

                          ^:mutable tail]
  ITransientCollection
  (-conj! [tcoll o]
    (if (.-edit root)
      (if (< (- cnt (tail-off tcoll)) 32)
        (do (aset tail (bit-and cnt 0x01f) o)
            (set! cnt (inc cnt))

      (throw (js/Error. "assoc! after persistent!"))))

  (-pop! [tcoll]
    (if ^boolean (.-edit root)
      (cond
        (zero? cnt) (throw (js/Error. "Can't pop empty vector"))
        (== 1 cnt)                       (do (set! cnt 0) tcoll)
