Skip to content

Commit

Permalink
fix(interopDefault): avoid in operator for primitive inputs (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 authored Oct 5, 2024
1 parent a86751e commit 4be8bff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ export function jitiInteropDefault(ctx: Context, mod: any) {
}

function interopDefault(mod: any): any {
if (!mod || !("default" in mod)) {
const modType = typeof mod;
if (mod === null || (modType !== "object" && modType !== "function")) {
return mod;
}

Expand Down

0 comments on commit 4be8bff

Please sign in to comment.