Skip to content

Commit 331f5e4

Browse files
committed
refactor: use known tag name in error message
1 parent 08baefe commit 331f5e4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,7 @@ function walk (opts, nodes) {
321321
if (loops.includes(node.tag)) {
322322
// handle syntax error
323323
if (!(node.attrs && node.attrs.loop)) {
324-
const tagName = loops.find(() => node.tag)
325-
throw new Error(`the "${tagName}" tag must have a "loop" attribute`)
324+
throw new Error(`the "${node.tag}" tag must have a "loop" attribute`)
326325
}
327326

328327
// parse the "loop" param

0 commit comments

Comments
 (0)