File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/runtime-core/src Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -382,17 +382,17 @@ export function withDefaults<
382
382
}
383
383
384
384
export function useSlots ( ) : SetupContext [ 'slots' ] {
385
- return getContext ( ) . slots
385
+ return getContext ( 'useSlots' ) . slots
386
386
}
387
387
388
388
export function useAttrs ( ) : SetupContext [ 'attrs' ] {
389
- return getContext ( ) . attrs
389
+ return getContext ( 'useAttrs' ) . attrs
390
390
}
391
391
392
- function getContext ( ) : SetupContext {
392
+ function getContext ( calledFunctionName : string ) : SetupContext {
393
393
const i = getCurrentInstance ( ) !
394
394
if ( __DEV__ && ! i ) {
395
- warn ( `useContext () called without active instance.` )
395
+ warn ( `${ calledFunctionName } () called without active instance.` )
396
396
}
397
397
return i . setupContext || ( i . setupContext = createSetupContext ( i ) )
398
398
}
You can’t perform that action at this time.
0 commit comments