Bugfix for null themePlaylists
This commit is contained in:
@@ -81,7 +81,7 @@ function App() {
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (allThemes && themeName && personalData) {
|
||||
if (allThemes && themeName && personalData && isThemePlaylistsFetched) {
|
||||
if (currentThemePlaylist === 'All') {
|
||||
if (themeName === 'random') {
|
||||
handleThemeChange(allThemes, false);
|
||||
@@ -91,7 +91,7 @@ function App() {
|
||||
}
|
||||
} else if (currentThemePlaylist === 'Time of Day') {
|
||||
const themeList = JSON.parse(
|
||||
themePlaylists.find((t: ThemePlaylist) => t.name === currentThemePlaylist)
|
||||
themePlaylists?.find((t: ThemePlaylist) => t.name === currentThemePlaylist)
|
||||
.themeList,
|
||||
);
|
||||
setTheme(
|
||||
@@ -112,7 +112,7 @@ function App() {
|
||||
);
|
||||
} else {
|
||||
const themeList = JSON.parse(
|
||||
themePlaylists.find((t: ThemePlaylist) => t.name === currentThemePlaylist)
|
||||
themePlaylists?.find((t: ThemePlaylist) => t.name === currentThemePlaylist)
|
||||
.themeList,
|
||||
);
|
||||
const filteredThemes = allThemes.filter((t: Theme) => themeList.includes(t.id));
|
||||
|
||||
Reference in New Issue
Block a user