This commit is contained in:
Nuckyz 2024-06-21 05:01:35 -03:00
parent 343e2802c3
commit 3cf702a2ba
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -260,7 +260,7 @@ function wrapAndPatchFactory(id: PropertyKey, originalFactory: AnyModuleFactory)
}
if (IS_DEV) {
return wrappedFactory.$$vencordOriginal?.apply(this, args);
return wrappedFactory.$$vencordOriginal!.apply(this, args);
}
}
@ -275,7 +275,7 @@ function wrapAndPatchFactory(id: PropertyKey, originalFactory: AnyModuleFactory)
}
logger.error("Error in patched module factory:\n", err);
return wrappedFactory.$$vencordOriginal?.apply(this, args);
return wrappedFactory.$$vencordOriginal!.apply(this, args);
}
// Webpack sometimes sets the value of module.exports directly, so assign exports to it to make sure we properly handle it