Explorar o código

Extra null check

James Allen %!s(int64=11) %!d(string=hai) anos
pai
achega
333591d087
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      services/document-updater/app/coffee/UpdateManager.coffee

+ 1 - 1
services/document-updater/app/coffee/UpdateManager.coffee

@@ -54,7 +54,7 @@ module.exports = UpdateManager =
 			UpdateManager.applyUpdates project_id, doc_id, updates, callback
 
 	applyUpdates: (project_id, doc_id, updates, callback = (error) ->) ->
-		for update in updates
+		for update in updates or []
 			UpdateManager._sanitizeUpdate update
 		ShareJsUpdateManager.applyUpdates project_id, doc_id, updates, (error, updatedDocLines, version) ->
 			return callback(error) if error?