Skip to content

Commit

Permalink
[AMR-41] fix: add decodeURI
Browse files Browse the repository at this point in the history
  • Loading branch information
N0chteil committed Dec 2, 2022
1 parent c766962 commit 8df5abf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,5 @@ setTimeout(async () => {
? fetchITunes()
: await fetchApp.appleMusic();

AppleBridge.emit(currentTrack.playerState, "music", currentTrack);
AppleBridge.emit(currentTrack?.playerState, "music", currentTrack);
}, 500);
2 changes: 1 addition & 1 deletion src/win32/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function fetchITunes(type = "currentTrack"): TrackData {
);

try {
return JSON.parse(data);
return JSON.parse(decodeURI(data));
} catch (e) {
console.error("[Win32][fetchITunes]", "Error parsing JSON:", e);

Expand Down

0 comments on commit 8df5abf

Please sign in to comment.