Skip to content

Commit fc0e824

Browse files
committed
fix(useCssModule): adapting the behavior of useCSSModule to the change of getCurrentInstance. close #620
1 parent 4b2f1ab commit fc0e824

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/apis/useCssModule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const useCSSModule = (name = '$style'): Record<string, string> => {
1212
return EMPTY_OBJ
1313
}
1414

15-
const mod = (instance as any)[name]
15+
const mod = (instance.proxy as any)?.[name]
1616
if (!mod) {
1717
__DEV__ &&
1818
warn(`Current instance does not have CSS module named "${name}".`)

0 commit comments

Comments
 (0)