Skip to content

Commit

Permalink
Fix the deprecated template property check method (#168)
Browse files Browse the repository at this point in the history
If the template property is not set, it will be `undefined` instead of `""`.

Co-authored-by: val <gwval3344@foxmail.com>
  • Loading branch information
val3344 and val3344 authored Feb 24, 2021
1 parent 7daf106 commit eda2663
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ hexo.extend.filter.register('after_post_render', (data) => {
theme = config.theme.trim().toLowerCase();

// deprecate the template keyword
if (config.template != "") {
if (config.template) {
dlog('warn', 'Looks like you use a deprecated property "template" to set up template, consider to use "theme"? See https://github.com/D0n9X1n/hexo-blog-encrypt#encrypt-theme');
}

Expand Down

0 comments on commit eda2663

Please sign in to comment.