diff options
Diffstat (limited to 'lib/json/encodeFile.js')
-rw-r--r-- | lib/json/encodeFile.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/json/encodeFile.js b/lib/json/encodeFile.js index 03b3450..d2c9e8a 100644 --- a/lib/json/encodeFile.js +++ b/lib/json/encodeFile.js @@ -6,8 +6,13 @@ @return {Object} */ function encodeFileToJson(file) { + var filePath = file.getPath(); + if (!filePath) { + return undefined; + } + return { - path: file.getPath(), + path: filePath, mtime: file.getMTime(), type: file.getType() }; |