diff --git a/code/lib/manager-api/src/index.tsx b/code/lib/manager-api/src/index.tsx index baa84f691776..ef5107c01ef6 100644 --- a/code/lib/manager-api/src/index.tsx +++ b/code/lib/manager-api/src/index.tsx @@ -486,7 +486,7 @@ export function useArgs(): [Args, (newArgs: Args) => void, (argNames?: string[]) const { getCurrentStoryData, updateStoryArgs, resetStoryArgs } = useStorybookApi(); const data = getCurrentStoryData(); - const args = data.type === 'story' ? data.args : {}; + const args = data?.type === 'story' ? data.args : {}; const updateArgs = useCallback( (newArgs: Args) => updateStoryArgs(data as API_StoryEntry, newArgs), [data, updateStoryArgs]