fix: 修復 lazyload 報 undefined 的 bug close #532

This commit is contained in:
Jerry
2021-03-30 22:35:40 +08:00
Unverified
parent 531269c60e
commit c48ce9af8c
3 changed files with 16 additions and 14 deletions

View File

@@ -2,7 +2,7 @@ const logger = require('hexo-log')()
hexo.extend.filter.register('before_generate', () => {
// Get first two digits of the Hexo version number
var hexoVer = hexo.version.replace(/(^.*\..*)\..*/, '$1')
const hexoVer = hexo.version.replace(/(^.*\..*)\..*/, '$1')
if (hexoVer < 5) {
logger.error('Please update Hexo to V5.0.0 or higher!')