Explorar el Código

Be defensive on comment text

Alasdair Smith hace 9 años
padre
commit
a0505afb23
Se han modificado 1 ficheros con 1 adiciones y 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?