Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESM issue: comparing namespace objects leads to exceptions #38

Open
mstoykov opened this issue Jul 26, 2024 · 0 comments
Open

ESM issue: comparing namespace objects leads to exceptions #38

mstoykov opened this issue Jul 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mstoykov
Copy link
Collaborator

		`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.

@mstoykov mstoykov added the bug Something isn't working label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant