Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
fix(patches): add the optional accessor to function calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Socketlike committed Sep 14, 2023
1 parent 1b1c7cf commit 62b1993
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/patches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const patches: types.PlaintextPatch[] = [
{
match: /return?\s?(.{0,30}\(.{1,3},\{[^}]+?,showTaglessAccountPanel:.+?\}\))/s,
replace:
'return [window.replugged.plugins.getExports("lib.evelyn.SpotifyModal")?.renderModal(),$1]',
'return [window.replugged.plugins.getExports("lib.evelyn.SpotifyModal")?.renderModal?.(),$1]',
},
],
},
Expand All @@ -18,7 +18,7 @@ const patches: types.PlaintextPatch[] = [
{
match: /(\.handleMessage=function\((.{1,3})\)){/,
replace:
'$1{window.replugged.plugins.getExports("lib.evelyn.SpotifyModal")?.emitMessage($2, this);',
'$1{window.replugged.plugins.getExports("lib.evelyn.SpotifyModal")?.emitMessage?.($2, this);',
},
],
},
Expand Down

0 comments on commit 62b1993

Please sign in to comment.