null check map on files and docs inside logger

This commit is contained in:
Henry Oswald 2018-03-27 14:41:56 +01:00
parent 70433e59da
commit eeb76441c0

View file

@ -22,14 +22,18 @@ module.exports =
}
docs: (docs) ->
docs.map (doc) ->
if !docs?.map?
return
docs?.map (doc) ->
{
path: doc.path
id: doc.doc
}
files: (files) ->
files.map (file) ->
if !files?.map?
return
files?.map (file) ->
{
path: file.path
id: file.file