Skip to content

Commit 0389ade

Browse files
committed
Deserialize json-post only if ok.
1 parent 0e96412 commit 0389ade

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sitefox/ui.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,4 @@
122122
:credentials "include"
123123
:body (js/JSON.stringify (clj->js data))}
124124
(js->clj options :keywordize-keys true))))))
125-
(.then (fn [res] (.json res)))))
125+
(.then (fn [res] (when (aget res "ok") (.json res))))))

0 commit comments

Comments
 (0)