Skip to content

Commit

Permalink
fix(wrapper): ignore chunks in strings
Browse files Browse the repository at this point in the history
  • Loading branch information
rxri committed Aug 27, 2024
1 parent 18aea02 commit 975d66d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jsHelper/spicetifyWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,8 @@ window.Spicetify = {
const text = await res.text();
const src = script.src.split("/").pop();
console.log(`[spicetifyWrapper] Waiting for ${src}`);
for (const pack of text.match(/(?:,|{)(\d+): ?\(.,.,./g).map((str) => str.slice(0, -7).slice(1))) {
// console.debug(`[spicetifyWrapper] Waiting for ${pack} of ${src}`);
for (const pack of text.match(/(?<!["'`])(?:,|{)(\d+): ?\(.,.,./g).map((str) => str.slice(0, -7).slice(1))) {
//console.debug(`[spicetifyWrapper] Waiting for ${pack} of ${src}`);
while (!require.m || !Object.keys(require.m).includes(pack)) {
await new Promise((r) => setTimeout(r, 100));
}
Expand Down

0 comments on commit 975d66d

Please sign in to comment.