Skip to content

Commit 8d806cb

Browse files
committed
fix(app-shell): drop the dead initializer flagged by no-useless-assignment (#4509)
`let def = null` is never read — both the try and the catch either assign or return — so ESLint's no-useless-assignment failed the Lint job. Declare without the initializer. Also removes an unused React import from the new hook test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E5CYr5SDwe85gH2Jr5KSgu
1 parent e8bec83 commit 8d806cb

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

packages/app-shell/src/hooks/__tests__/useNavActionDispatch.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
*/
1818

1919
import { describe, it, expect, vi, beforeEach } from 'vitest';
20-
import React from 'react';
2120
import { renderHook, act } from '@testing-library/react';
2221

2322
const execute = vi.fn();

packages/app-shell/src/hooks/useNavActionDispatch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export function useNavActionDispatch(): (item: NavigationItem) => void {
6363
return;
6464
}
6565

66-
let def: ActionDefLike | null = null;
66+
let def: ActionDefLike | null;
6767
try {
6868
def = (await getItem('action', actionName)) as ActionDefLike | null;
6969
} catch (err) {

0 commit comments

Comments
 (0)