Skip to content

Commit

Permalink
Fixed processor #100
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy351 committed Mar 2, 2013
1 parent 3ca0a22 commit 223dd4c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/plugins/processor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ var load = function(file, stat, extname, callback){
meta.source = source;
meta.mtime = stat.mtime;
meta.ctime = stat.ctime;
if (!_.isDate(meta.date)) meta.date = moment(meta.date, 'YYYY-MM-DD HH:mm:ss').toDate();
if (meta.date && !_.isDate(meta.date)) meta.date = moment(meta.date, 'YYYY-MM-DD HH:mm:ss').toDate();
if (meta.updated){
if (!_.isDate(meta.updated)) meta.updated = moment(meta.updated, 'YYYY-MM-DD HH:mm:ss').toDate();
} else {
Expand Down Expand Up @@ -439,6 +439,8 @@ extend.processor.register(/^[^_](?:(?!\/_).)*$/, function(file, callback){
var meta = results.check,
_id = results.id;

if (!meta.date) meta.date = meta.ctime;

if (meta.permalink){
var link = meta.permalink;

Expand Down

0 comments on commit 223dd4c

Please # to comment.