-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: crash after opening settings and late ignition
- Loading branch information
1 parent
fb2f049
commit 6f41403
Showing
3 changed files
with
34 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { PlaintextPatch } from "src/types"; | ||
|
||
const coremodStr = "replugged.coremods.coremods.settings"; | ||
|
||
export default [ | ||
{ | ||
find: "getPredicateSections", | ||
replacements: [ | ||
{ | ||
match: /this\.props\.sections\.filter\((.+?)\)}/, | ||
replace: (_, sections) => | ||
`${coremodStr}.insertSections(this.props.sections.filter(${sections}))};`, | ||
}, | ||
], | ||
}, | ||
{ | ||
find: ".versionHash", | ||
replacements: [ | ||
{ | ||
match: /appArch,children:.{0,200}?className:\w+\.line,.{0,100}children:\w+}\):null/, | ||
replace: `$&,${coremodStr}.VersionInfo()`, | ||
}, | ||
], | ||
}, | ||
] as PlaintextPatch[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters