Skip to content

Commit bf2dfd7

Browse files
committed
Update index.js
1 parent b6ed3a3 commit bf2dfd7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,14 @@ async function load() {
194194
loadStart = 0;
195195
}
196196

197-
async function unloadModule(moduleName) {
198-
let nodeModule = require.cache[moduleName];
197+
async function unloadModule(modulePath) {
198+
let nodeModule = require.cache[modulePath];
199199
if (nodeModule) {
200200
if (nodeModule.children.length) await chillout.forEach(nodeModule.children, async (child) => {
201201
if (child.filename) unloadModule(child.filename);
202202
});
203203
}
204-
delete require.cache[moduleName];
204+
delete require.cache[modulePath];
205205
}
206206

207207
async function unload() {

0 commit comments

Comments
 (0)