diff --git a/src/renderer/features/now-playing/components/play-queue.tsx b/src/renderer/features/now-playing/components/play-queue.tsx index 98a8516b..0b8bc581 100644 --- a/src/renderer/features/now-playing/components/play-queue.tsx +++ b/src/renderer/features/now-playing/components/play-queue.tsx @@ -173,7 +173,7 @@ export const PlayQueue = forwardRef(({ type }: QueueProps, ref: Ref) => { const handleGridSizeChange = () => { if (tableConfig.autoFit) { - tableRef?.current?.api.sizeColumnsToFit(); + tableRef?.current?.api?.sizeColumnsToFit(); } }; diff --git a/src/renderer/features/playlists/components/playlist-detail-song-list-content.tsx b/src/renderer/features/playlists/components/playlist-detail-song-list-content.tsx index dc406352..298e4742 100644 --- a/src/renderer/features/playlists/components/playlist-detail-song-list-content.tsx +++ b/src/renderer/features/playlists/components/playlist-detail-song-list-content.tsx @@ -140,7 +140,7 @@ export const PlaylistDetailSongListContent = ({ tableRef }: PlaylistDetailConten const handleGridSizeChange = () => { if (page.table.autoFit) { - tableRef?.current?.api.sizeColumnsToFit(); + tableRef?.current?.api?.sizeColumnsToFit(); } };