Skip to content

Commit

Permalink
fix(wrapper): exclude string to find module on 1.2.38 (#3040)
Browse files Browse the repository at this point in the history
  • Loading branch information
rxri committed May 23, 2024
1 parent 6ff909e commit 11f85a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jsHelper/spicetifyWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,10 @@ window.Spicetify = {

// classnames
// https://github.com/JedWatson/classnames/
const classnamesChunk = chunks.find(([_, value]) => value.toString().includes("[native code]") && !value.toString().includes("<anonymous>"));
const classnamesChunk = chunks.find(
([_, value]) =>
value.toString().includes("[native code]") && !value.toString().includes("<anonymous>") && !value.toString().includes("Super expression")
);
if (classnamesChunk && !Spicetify.classnames) {
Spicetify.classnames = Object.values(require(classnamesChunk[0])).find(m => typeof m === "function");
}
Expand Down

0 comments on commit 11f85a2

Please sign in to comment.