Skip to content

Commit

Permalink
fix: favorites and history validation error
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristiaanScheermeijer committed Feb 7, 2024
1 parent dbecda4 commit 3deabfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/common/src/services/FavoriteService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class FavoriteService {
}

private validateFavorites(favorites: unknown) {
if (schema.validateSync(favorites)) {
if (favorites && schema.validateSync(favorites)) {
return favorites as SerializedFavorite[];
}

Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/services/WatchHistoryService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default class WatchHistoryService {
};

private validateWatchHistory(history: unknown) {
if (schema.validateSync(history)) {
if (history && schema.validateSync(history)) {
return history as SerializedWatchHistoryItem[];
}

Expand Down

0 comments on commit 3deabfc

Please sign in to comment.