Skip to content

Commit 73dc216

Browse files
committed
perf: default locals attr
1 parent 3f3d261 commit 73dc216

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ module.exports = function postHTMLExpressions (options) {
114114
loopTags: ['each'],
115115
scopeTags: ['scope'],
116116
ignoredTag: 'raw',
117-
strictMode: true
117+
strictMode: true,
118+
localsAttr: 'locals'
118119
}, options)
119120

120121
// set tags

lib/locals.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const ctx = vm.createContext({ module })
2121
*/
2222
function scriptDataLocals (tree, options) {
2323
const locals = {}
24-
const localsAttr = options.localsAttr || 'locals'
24+
const localsAttr = options.localsAttr
2525

2626
match.call(tree, matchHelper(`script[${localsAttr}]`), node => {
2727
if (node.content) {

0 commit comments

Comments
 (0)