Skip to content
This repository has been archived by the owner on Nov 4, 2021. It is now read-only.

Commit

Permalink
fix websock
Browse files Browse the repository at this point in the history
  • Loading branch information
WuJun2016 committed Sep 7, 2020
1 parent 6d3b8b8 commit fdc0c0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/steve/subscribe.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export const actions = {
},

send({ state, commit }, obj) {
if ( state.socket) {
if ( state.socket && state.socket.state === STATE_CONNECTED) {
return state.socket.send(JSON.stringify(obj));
} else {
commit('enqueuePending', obj);
Expand Down

0 comments on commit fdc0c0c

Please sign in to comment.