small fix to disconnect function--null pointer exception

This commit is contained in:
Jared Tabor 2016-09-14 12:15:20 -07:00
parent 4e533cc63b
commit 37b2b01e02

View File

@ -79,7 +79,9 @@ export default
}, 2000);
},
disconnect: function(){
this.socket.close();
if(this.socket){
this.socket.close();
}
},
subscribe: function(state){
console.log("Next state: " + state.name);