Skip to content

Commit 709686e

Browse files
committed
fix: if locals not json
1 parent 8aa7c28 commit 709686e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ module.exports = (options = {}) => {
2525
if (src) {
2626
src = path.resolve(options.root, src);
2727
source = fs.readFileSync(src, options.encoding);
28-
29-
if (locals) {
28+
if (locals && locals.includes(':')) {
3029
locals = JSON.parse(locals);
3130
const result = posthtml()
3231
.use(expressions({locals}))

0 commit comments

Comments
 (0)