fix: yaml.safeLoad -> yaml.load in js-yaml@4

This commit is contained in:
XPoet 2021-02-24 21:34:54 +08:00
parent 7ee5603112
commit 91d73783e8
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ hexo.extend.helper.register('export_config', function () {
file = languageDir + '/' + (file ? file : 'en.yml'); file = languageDir + '/' + (file ? file : 'en.yml');
let languageContent = fs.readFileSync(file, 'utf8'); let languageContent = fs.readFileSync(file, 'utf8');
try { try {
languageContent = yaml.safeLoad(languageContent); languageContent = yaml.load(languageContent);
} catch (e) { } catch (e) {
console.log(e); console.log(e);
} }