Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 9cc70e2

Browse files
danielamramFrenchBen
authored andcommitted
- Fixed favorites containers initialize. (#3541)
Signed-off-by: Daniel Amram <danielamram0@gmail.com>
1 parent 495750e commit 9cc70e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/actions/ContainerActions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class ContainerActions {
4545
}
4646

4747
toggleFavorite (name) {
48-
let favorites = JSON.parse(localStorage.getItem('containers.favorites'));
48+
let favorites = JSON.parse(localStorage.getItem('containers.favorites')) || [];
4949
if (favorites.includes(name)) {
5050
favorites = favorites.filter(favoriteName => favoriteName !== name);
5151
} else {

0 commit comments

Comments
 (0)