Skip to content
Browse files

Fix #58 - don't emit an array - always a string

  • Loading branch information...
1 parent cf820c5 commit 70107889822e6644594a506484cd02bb043fdc3f @majek majek committed Apr 20, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/trans-websocket.coffee
View
6 src/trans-websocket.coffee
@@ -80,7 +80,11 @@ class WebSocketReceiver extends transport.GenericReceiver
message = JSON.parse(payload)
catch x
return @didClose(1002, 'Broken framing.')
- @session.didMessage(message)
+ if payload[0] is '['
+ for msg in message
+ @session.didMessage(msg)
+ else
+ @session.didMessage(message)
doSendFrame: (payload) ->
if @ws

0 comments on commit 7010788

Please sign in to comment.
Something went wrong with that request. Please try again.