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<
382382}
383383
384384export function useSlots ( ) : SetupContext [ 'slots' ] {
385- return getContext ( ) . slots
385+ return getContext ( 'useSlots' ) . slots
386386}
387387
388388export function useAttrs ( ) : SetupContext [ 'attrs' ] {
389- return getContext ( ) . attrs
389+ return getContext ( 'useAttrs' ) . attrs
390390}
391391
392- function getContext ( ) : SetupContext {
392+ function getContext ( calledFunctionName : string ) : SetupContext {
393393 const i = getCurrentInstance ( ) !
394394 if ( __DEV__ && ! i ) {
395- warn ( `useContext () called without active instance.` )
395+ warn ( `${ calledFunctionName } () called without active instance.` )
396396 }
397397 return i . setupContext || ( i . setupContext = createSetupContext ( i ) )
398398}
You can’t perform that action at this time.
0 commit comments