Skip to content

Commit c0bb5d8

Browse files
committed
fix(apply): remove 4th submatch since it's unnecessary
1 parent 4e947ad commit c0bb5d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/apply/apply.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ func insertNavLink(str string, appNameArray string) string {
338338
})
339339

340340
// Global Navbar >= 1.2.46
341-
utils.ReplaceOnce(&str, `("global-nav-bar".*?)(\(0,\s*[a-zA-Z_\$][\w\$]*\.jsx\))(\(\s*\w+,\s*\{\s*className:\w*\s*\}\s*\))\s*\}\),\s*(\(0,)`, func(submatches ...string) string {
342-
return fmt.Sprintf("%s[%s%s,Spicetify._renderNavLinks([%s], true)].flat()}),%s", submatches[1], submatches[2], submatches[3], appNameArray, submatches[4])
341+
utils.ReplaceOnce(&str, `("global-nav-bar".*?)(\(0,\s*[a-zA-Z_\$][\w\$]*\.jsx\))(\(\s*\w+,\s*\{\s*className:\w*\s*\}\s*\))`, func(submatches ...string) string {
342+
return fmt.Sprintf("%s[%s%s,Spicetify._renderNavLinks([%s], true)].flat()", submatches[1], submatches[2], submatches[3], appNameArray)
343343
})
344344

345345
return str

0 commit comments

Comments
 (0)