Skip to content

Commit ba78342

Browse files
authored
Fix: changing safeLoad for load in js-yaml>4
Changing safeLoad for load in js-yaml>4 --- Close #1219
1 parent 551f33a commit ba78342

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/server/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ const commonConfiguration = (app) => {
5858
const menuDataDir = path.join(hexoDir, 'content/_data/menu.yml');
5959
const configDataDir = path.join(rootPath, '_config.yml');
6060
const webhintThemeDir = path.join(hexoDir, theme, '_config.yml');
61-
const menuData = yaml.safeLoad(fs.readFileSync(menuDataDir, 'utf8')); // eslint-disable-line no-sync
62-
const config = yaml.safeLoad(fs.readFileSync(configDataDir, 'utf8')); // eslint-disable-line no-sync
63-
const webhintTheme = yaml.safeLoad(fs.readFileSync(webhintThemeDir, 'utf8')); // eslint-disable-line no-sync
61+
const menuData = yaml.load(fs.readFileSync(menuDataDir, 'utf8')); // eslint-disable-line no-sync
62+
const config = yaml.load(fs.readFileSync(configDataDir, 'utf8')); // eslint-disable-line no-sync
63+
const webhintTheme = yaml.load(fs.readFileSync(webhintThemeDir, 'utf8')); // eslint-disable-line no-sync
6464

6565
app.set('hexoDir', hexoDir);
6666
app.set('rootPath', rootPath);

0 commit comments

Comments
 (0)