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

Error with Builder.up depending on context #711

Closed
H-L opened this issue Jun 18, 2024 · 1 comment · Fixed by #714
Closed

Error with Builder.up depending on context #711

H-L opened this issue Jun 18, 2024 · 1 comment · Fixed by #714

Comments

@H-L
Copy link
Contributor

H-L commented Jun 18, 2024

Hello,

I encountered an error using Strophe in Workers, compiled as a dependency. It appears that the method Builder.up() is using this.node = this.node.parentElement; but in this particular context, node.parentElement does not exists.

I patched it locally, replacing it by node.parentNode and it seems to work.

I don't know if it would have side effects to change it directly.

Let me know if you need a PR.

Best regards

@jcbrand
Copy link
Contributor

jcbrand commented Jun 23, 2024

Hi, I would appreciate a PR, thanks. I think for backwards compatibility, the code could use parentElement if it's available and fall back to using parentNode if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants