From 05f9a326b62215fba7ae995f9c5c68a58990a993 Mon Sep 17 00:00:00 2001 From: adryd Date: Wed, 22 Nov 2023 16:35:36 -0500 Subject: [PATCH] double negative whoops --- src/wpTools.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/wpTools.js b/src/wpTools.js index 9f98040..b262303 100644 --- a/src/wpTools.js +++ b/src/wpTools.js @@ -11,8 +11,10 @@ export default function wpTools(module, exports, webpackRequire) { Object.entries(webpackRequire.c) .filter(([moduleId, exportCache]) => { return !keys.some((searchKey) => { - return ( - exportCache != undefined && exportCache != window && (exports?.[searchKey] || exports?.default?.[searchKey]) + return !( + exportCache != undefined && + exportCache != window && + (exports?.[searchKey] || exports?.default?.[searchKey]) ); }); }) @@ -32,7 +34,7 @@ export default function wpTools(module, exports, webpackRequire) { function inspectModule(moduleId) { /* TODO: rewrap modules if not patched. - * This used to isolate modules like wrapping them in the patcher stage did, + * This used to isolate modules like wrapping them in the patcher stage did, * however this seems to have broken in newer browsers */ return webpackRequire.m[moduleId]; } @@ -46,7 +48,6 @@ export default function wpTools(module, exports, webpackRequire) { // TODO: SWC helpers // function getDefault() {} - window.wpTools = module.exports.default = exports.default =