Skip to content

Commit

Permalink
refactor: drop lodash for new-post-path filter (hexojs#3813)
Browse files Browse the repository at this point in the history
* refactor: drop lodash for new-post-path filter
* fix: handle null case for new-post-path filter
  • Loading branch information
SukkaW authored and Thomas Parisot committed Jan 17, 2020
1 parent 389f6dc commit b955f50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/plugins/filter/new_post_path.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const { join, extname } = require('path');
const moment = require('moment');
const defaults = require('lodash/defaults');
const Promise = require('bluebird');
const { Permalink } = require('hexo-util');
const fs = require('hexo-fs');
Expand Down Expand Up @@ -75,7 +74,8 @@ function newPostPathFilter(data = {}, replace) {
}

target = join(postDir, permalink.stringify(
defaults(filenameData, permalinkDefaults)));
Object.assign({}, permalinkDefaults, filenameData)
));
}
}
} else {
Expand Down

0 comments on commit b955f50

Please sign in to comment.