Make toStringTag non enumerable
This commit is contained in:
parent
8dde496757
commit
2f16cdf77b
|
@ -17,9 +17,7 @@ type PatchedModuleFactory = ModuleFactory & {
|
||||||
$$vencordOriginal?: ModuleFactory;
|
$$vencordOriginal?: ModuleFactory;
|
||||||
};
|
};
|
||||||
|
|
||||||
type PatchedModuleFactories = Record<PropertyKey, PatchedModuleFactory> & {
|
type PatchedModuleFactories = Record<PropertyKey, PatchedModuleFactory>;
|
||||||
[Symbol.toStringTag]?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
const logger = new Logger("WebpackInterceptor", "#8caaee");
|
const logger = new Logger("WebpackInterceptor", "#8caaee");
|
||||||
|
|
||||||
|
@ -140,7 +138,11 @@ Object.defineProperty(Function.prototype, "m", {
|
||||||
|
|
||||||
allModuleFactories.add(moduleFactories);
|
allModuleFactories.add(moduleFactories);
|
||||||
|
|
||||||
moduleFactories[Symbol.toStringTag] = "ModuleFactories";
|
Object.defineProperty(moduleFactories, Symbol.toStringTag, {
|
||||||
|
value: "ModuleFactories",
|
||||||
|
configurable: true,
|
||||||
|
writable: true
|
||||||
|
});
|
||||||
moduleFactories = new Proxy(moduleFactories, moduleFactoriesHandler);
|
moduleFactories = new Proxy(moduleFactories, moduleFactoriesHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,8 +78,11 @@ export function _initWebpack(webpackRequire: WebpackRequire) {
|
||||||
wreq = webpackRequire;
|
wreq = webpackRequire;
|
||||||
cache = webpackRequire.c;
|
cache = webpackRequire.c;
|
||||||
|
|
||||||
// @ts-ignore
|
Object.defineProperty(webpackRequire.c, Symbol.toStringTag, {
|
||||||
webpackRequire.c[Symbol.toStringTag] = "ModuleCache";
|
value: "ModuleCache",
|
||||||
|
configurable: true,
|
||||||
|
writable: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let devToolsOpen = false;
|
let devToolsOpen = false;
|
||||||
|
|
Loading…
Reference in a new issue