Skip to content

Commit d006c9a

Browse files
WezSieTatoCopilot
andauthored
fix: guard
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent a2d82c4 commit d006c9a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/validateEAN.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ function validateEAN(elem) {
2828
return num === parseInt(elem[elem.length - 1], 10);
2929
}
3030

31-
if (typeof module !== 'undefined') module.exports = { validateEAN };
31+
if (typeof module !== 'undefined' && module.exports) module.exports = { validateEAN };

0 commit comments

Comments
 (0)