diff --git a/src/index.ts b/src/index.ts index a92d556..8db7bc9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,6 +8,6 @@ export { ono }; export default ono; // CommonJS default export hack -if (typeof module === "object" && typeof module.exports === "object") { +if (typeof module === "object" && typeof module.exports === "object" && typeof module.exports.default == "object") { module.exports = Object.assign(module.exports.default, module.exports); }