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

TypeError when trying to open 2 NewWindows in same window #159

Open
Aleafan opened this issue Mar 21, 2024 · 0 comments
Open

TypeError when trying to open 2 NewWindows in same window #159

Aleafan opened this issue Mar 21, 2024 · 0 comments

Comments

@Aleafan
Copy link

Aleafan commented Mar 21, 2024

Hi! Thanks a lot for your work!

I found that when trying to open 2 different NewWindow components in the window with the same name, TypeError in thrown:
image

The problem is in the code below - staticContainer is not found so equals to null and removeChild method expects argument of type Node only.

// Remove any existing content
const staticContainer = this.window.document.getElementById(
  'new-window-container-static'
)
this.window.document.body.removeChild(staticContainer)

When I add staticContainer check it works just fine:
staticContainer && this.window.document.body.removeChild(staticContainer)

Is it even supposed to work in that way?

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

No branches or pull requests

1 participant