Skip to content

Commit 03f24f2

Browse files
committed
feat: custom blocks
1 parent 71aff6e commit 03f24f2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/plugin-vue/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin {
131131
block = descriptor.template!
132132
} else if (query.type === 'style') {
133133
block = descriptor.styles[query.index!]
134-
} else if (query.index) {
134+
} else if (query.index != null) {
135135
block = descriptor.customBlocks[query.index]
136136
}
137137
if (block) {

packages/plugin-vue/src/utils/query.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function parseVueRequest(id: string) {
1414
if (query.vue != null) {
1515
query.vue = true
1616
}
17-
if (query.index) {
17+
if (query.index != null) {
1818
query.index = Number(query.index)
1919
}
2020
return {

0 commit comments

Comments
 (0)