Skip to content

Commit

Permalink
fix(deps): script not initializing if history API hasn't loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
ohitstom authored Feb 17, 2024
1 parent 8717687 commit d3c4b69
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions catppuccin/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
Spicetify.Platform &&
Spicetify.React &&
Spicetify.ReactDOM &&
Spicetify.Config
Spicetify.Config &&
Spicetify.Platform.History
)
) {
setTimeout(catppuccin, 100);
Expand Down Expand Up @@ -156,7 +157,7 @@
);

// Initialize + Listener
insertOption(Spicetify.Platform.History.location.pathname);
insertOption(Spicetify.Platform.History.location?.pathname);
Spicetify.Platform.History.listen((event) => {
insertOption(event.pathname);
});
Expand Down

0 comments on commit d3c4b69

Please sign in to comment.