Skip to content

Commit 960ecc9

Browse files
committed
fix(load): fix load plugin step
1 parent 079b8fd commit 960ecc9

File tree

2 files changed

+325
-346
lines changed

2 files changed

+325
-346
lines changed

src/transform/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ export const unpluginNuxtStyle = createUnplugin<any>(({ components }: { componen
5454
const { descriptor } = parse(file, { filename })
5555

5656
const style = descriptor.styles[query.index!]
57-
let source = style.content || ''
57+
58+
let source = style?.content || ''
59+
5860
source = resolveStyleTs(source)
5961
source = resolveStyle(source)
6062

61-
if (style.content !== source) {
62-
return source
63-
}
63+
if (style?.content !== source) { return source }
6464
}
6565
},
6666

0 commit comments

Comments
 (0)