mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-23 15:05:11 +00:00
Apply suggestions from code review
Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
This commit is contained in:
parent
bb90ec3cb3
commit
434fd8ae52
2 changed files with 4 additions and 4 deletions
|
@ -191,8 +191,8 @@ define(Function.prototype, "m", {
|
|||
|
||||
define(this, "m", { value: proxiedModuleFactories });
|
||||
|
||||
// Overwrite webpack's defineExports function to define the export descriptors configurable.
|
||||
// This is needed so we can later blacklist specific exports from webpack search by making them non-enumerable
|
||||
// Overwrite Webpack's defineExports function to define the export descriptors configurable.
|
||||
// This is needed so we can later blacklist specific exports from Webpack search by making them non-enumerable
|
||||
this.d = function (exports: object, getters: object) {
|
||||
for (const key in getters) {
|
||||
if (Object.hasOwn(getters, key) && !Object.hasOwn(exports, key)) {
|
||||
|
|
|
@ -135,13 +135,13 @@ function makePropertyNonEnumerable(target: Object, key: PropertyKey) {
|
|||
});
|
||||
}
|
||||
|
||||
export function _blacklistBadModules(requireCache: NonNullable<AnyWebpackRequire["c"]>, exports: any, moduleId: PropertyKey) {
|
||||
export function _blacklistBadModules(requireCache: NonNullable<AnyWebpackRequire["c"]>, exports: ModuleExports, moduleId: PropertyKey) {
|
||||
if (_shouldIgnoreValue(exports)) {
|
||||
makePropertyNonEnumerable(requireCache, moduleId);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (typeof exports !== "object" || exports == null) {
|
||||
if (typeof exports !== "object") {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue