Skip to content

Commit

Permalink
fix: Fixed exportModule loop
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Nov 8, 2022
1 parent 6a0ab71 commit e617fe5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/whatsapp/exportModule.ts
Expand Up @@ -65,6 +65,9 @@ export function exportModule(
const description = `Module ${name} was not found with ${condition.toString()}`;
console.error(description);
trackException(description);
Object.defineProperty(this, name, {
get: () => undefined,
});
return undefined;
}

Expand All @@ -84,6 +87,9 @@ export function exportModule(
)} was not found for ${name} in module ${moduleId}`;
console.error(description);
trackException(description);
Object.defineProperty(this, name, {
get: () => undefined,
});
return undefined;
}
} else {
Expand All @@ -95,6 +101,9 @@ export function exportModule(
const description = `Property ${property} was not found for ${name} in module ${moduleId}`;
console.error(description);
trackException(description);
Object.defineProperty(this, name, {
get: () => undefined,
});
return undefined;
}
functionPath = property;
Expand All @@ -121,6 +130,9 @@ export function exportModule(
return valueFn();
}

Object.defineProperty(this, name, {
get: () => undefined,
});
return undefined;
},
});
Expand Down

0 comments on commit e617fe5

Please sign in to comment.