From 91d73783e85d70a772d2e4742464a5f10e636a51 Mon Sep 17 00:00:00 2001 From: XPoet Date: Wed, 24 Feb 2021 21:34:54 +0800 Subject: [PATCH] fix: yaml.safeLoad -> yaml.load in js-yaml@4 --- scripts/helpers/export-config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/helpers/export-config.js b/scripts/helpers/export-config.js index c014176..4858268 100644 --- a/scripts/helpers/export-config.js +++ b/scripts/helpers/export-config.js @@ -20,7 +20,7 @@ hexo.extend.helper.register('export_config', function () { file = languageDir + '/' + (file ? file : 'en.yml'); let languageContent = fs.readFileSync(file, 'utf8'); try { - languageContent = yaml.safeLoad(languageContent); + languageContent = yaml.load(languageContent); } catch (e) { console.log(e); }