Skip to content

Commit 57741d8

Browse files
perf(core): minor optimization
1 parent fdf4f43 commit 57741d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,8 @@ async function createSFCModule(source : string, filename : string, options : Opt
790790
addStyle(style, descStyle.scoped ? scopeId : undefined);
791791
}
792792

793-
await Promise.all(customBlockCallbacks.map(cb => cb?.(component)));
793+
if ( customBlockHandler !== undefined )
794+
await Promise.all(customBlockCallbacks.map(cb => cb?.(component)));
794795

795796
return component;
796797
}

0 commit comments

Comments
 (0)