Extra null check

This commit is contained in:
James Allen 2015-06-12 10:16:33 +01:00
parent a3847d21d5
commit 333591d087

View file

@ -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?