mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-15 01:23:03 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
d0c47f2c0e
5 changed files with 153 additions and 99 deletions
|
@ -428,11 +428,12 @@ function patchFactory(id: PropertyKey, factory: AnyModuleFactory): [patchedFacto
|
|||
continue;
|
||||
}
|
||||
|
||||
const buildNumber = getBuildNumber();
|
||||
const shouldCheckBuildId = !Settings.eagerPatches && buildNumber !== -1;
|
||||
// Reporter eagerly patches and cannot retrieve the build number because this code runs before the module for it is loaded
|
||||
const buildNumber = IS_REPORTER ? -1 : getBuildNumber();
|
||||
const shouldCheckBuildNumber = !Settings.eagerPatches && buildNumber !== -1;
|
||||
|
||||
if (
|
||||
shouldCheckBuildId &&
|
||||
shouldCheckBuildNumber &&
|
||||
(patch.fromBuild != null && buildNumber < patch.fromBuild) ||
|
||||
(patch.toBuild != null && buildNumber > patch.toBuild)
|
||||
) {
|
||||
|
@ -454,7 +455,7 @@ function patchFactory(id: PropertyKey, factory: AnyModuleFactory): [patchedFacto
|
|||
// We change all patch.replacement to array in plugins/index
|
||||
for (const replacement of patch.replacement as PatchReplacement[]) {
|
||||
if (
|
||||
shouldCheckBuildId &&
|
||||
shouldCheckBuildNumber &&
|
||||
(replacement.fromBuild != null && buildNumber < replacement.fromBuild) ||
|
||||
(replacement.toBuild != null && buildNumber > replacement.toBuild)
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue