Skip to content

Commit 4e2679d

Browse files
committed
Fix handshakes interfering with singleton WebSocket callback replies
1 parent 49b4e31 commit 4e2679d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/taoensso/sente.cljx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,8 @@
567567

568568
#+cljs
569569
(defn- handle-when-handshake! [chsk clj]
570-
(when (= (first clj) :chsk/handshake)
570+
(when (and (vector? clj) ; Nb clj may be callback reply
571+
(= (first clj) :chsk/handshake))
571572
(let [[_ [uid csrf-token]] clj]
572573
(when (str/blank? csrf-token)
573574
(encore/warnf "NO CSRF TOKEN AVAILABLE"))

0 commit comments

Comments
 (0)