Skip to content

Commit be83471

Browse files
Copilothotlong
andcommitted
Fix TypeScript error: Remove non-existent 'records' property from PaginatedResult
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent f34adc6 commit be83471

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/msw-react-crud/src/components/TaskList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ export function TaskList({ client, onEdit, refreshTrigger }: TaskListProps) {
3636
sort: ['priority', '-created_at']
3737
});
3838

39-
// Handle { value: [] } (OData), { records: [] } (Protocol) and [] (Raw) formats
40-
const rawValues = Array.isArray(result) ? result : (result.value || result.records || []);
39+
// Handle { value: [] } (PaginatedResult) and [] (Raw) formats
40+
const rawValues = Array.isArray(result) ? result : (result.value || []);
4141
const fetchedTasks = [...rawValues] as Task[];
4242

4343
// Client-side sort fallback (since InMemoryDriver has limited sort support)

0 commit comments

Comments
 (0)