Skip to content

Commit 02a2a36

Browse files
authored
Merge pull request #86 from Konnng/master
fix: merging issue with global local prop
2 parents 7c10bbe + c704db2 commit 02a2a36

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ module.exports = (options = {}) => {
4646
const localsJson = JSON.parse(localsRaw);
4747
posthtmlExpressionsOptions = {
4848
...posthtmlExpressionsOptions,
49-
locals: posthtmlExpressionsOptions.locals ?
50-
Object.assign(posthtmlExpressionsOptions.locals, localsJson) :
51-
localsJson
49+
locals: posthtmlExpressionsOptions.locals ? {...posthtmlExpressionsOptions.locals, ...localsJson} : localsJson
5250
};
5351
} catch {}
5452

0 commit comments

Comments
 (0)