ESM issue: comparing namespace objects leads to exceptions
Opened this issue · 0 comments
mstoykov commented
`a.js`: `
import * as ns from "dep.js"
if (ns != "some value") {
globalThis.s = 5
};
`,
`dep.js`: `
export let s = 42;
`,
Will lead to
TypeError: Could not convert &{{ 0xc0001df2f0 false map[] [] 0 0 0xc0001df380 map[]} 0xc0001c4140 map[s:{}] [s]} to primitive\n\tat a.js:3:8(12)
While it is expected that this will fail, not being able to compare them at all, and having exceptions seems worse.