Explorar o código

Be defensive on comment text

Alasdair Smith %!s(int64=9) %!d(string=hai) anos
pai
achega
a0505afb23
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      services/real-time/app/coffee/WebsocketController.coffee

+ 1 - 1
services/real-time/app/coffee/WebsocketController.coffee

@@ -106,7 +106,7 @@ module.exports = WebsocketController =
 					if options.encodeRanges
 						try
 							for comment in ranges?.comments or []
-								comment.op.c = encodeForWebsockets(comment.op.c)
+								comment.op.c = encodeForWebsockets(comment.op.c) if comment.op.c?
 							for change in ranges?.changes or []
 								change.op.i = encodeForWebsockets(change.op.i) if change.op.i?
 								change.op.d = encodeForWebsockets(change.op.d) if change.op.d?