Skip to content

Commit

Permalink
bug undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaslabbe committed Aug 10, 2016
1 parent 07431b4 commit 3cf8967
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/cli/helpers/file-parser.js
Expand Up @@ -385,6 +385,7 @@ export default class FileParser {
FileParser.changePathEnv(pub.path, config.data.url)
.replace(new RegExp("\\." + config.files.templates.extension), '.json')
)

if(typeof json[config.meta.name] !== 'undefined'
&& json[config.meta.name] !== null
&& typeof json[config.meta.name][config.draft.url] !== 'undefined'
Expand Down
2 changes: 1 addition & 1 deletion src/cli/helpers/file-utils.js
Expand Up @@ -225,7 +225,7 @@ export default class FileUtils {
var revision = {
status: file.status,
filePath: file.filePath,
date: file.abe_meta.latest ? file.abe_meta.latest.date : '',
date: file.abe_meta && file.abe_meta.latest ? file.abe_meta.latest.date : '',
template: file[config.meta.name].template ? file[config.meta.name].template.replace(/^\/+/, '') : '',
cleanFilePath: cleanFilePath
}
Expand Down

0 comments on commit 3cf8967

Please sign in to comment.