Skip to content

Commit 859a45d

Browse files
authored
fix: should not pass undefined to bindingsQuery (#1735)
closes #1740
1 parent 4b9b26c commit 859a45d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export default function loader(
163163
const scopedQuery = hasScoped ? `&scoped=true` : ``
164164
const attrsQuery = attrsToQuery(descriptor.template.attrs)
165165
const bindingsQuery = script
166-
? `&bindings=${JSON.stringify(script.bindings)}`
166+
? `&bindings=${JSON.stringify(script.bindings ?? {})}`
167167
: ``
168168
const query = `?vue&type=template${idQuery}${scopedQuery}${attrsQuery}${bindingsQuery}${resourceQuery}`
169169
templateRequest = stringifyRequest(src + query)

0 commit comments

Comments
 (0)