use empty object for ranges if it doesn't exist

This commit is contained in:
nate stemen 2020-03-06 13:49:30 -05:00 committed by GitHub
parent dec18e0773
commit ffd8d0745d

View file

@ -30,7 +30,7 @@ module.exports = DocumentManager =
return callback(error) if error?
RedisManager.setHistoryType doc_id, projectHistoryType, (error) ->
return callback(error) if error?
callback null, lines, version, ranges, pathname, projectHistoryId, null, false
callback null, lines, version, ranges || {}, pathname, projectHistoryId, null, false
else
callback null, lines, version, ranges, pathname, projectHistoryId, unflushedTime, true