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

Console error when exiting query builder #3523

Closed
maxpatiiuk opened this issue May 22, 2023 · 2 comments · Fixed by #3546
Closed

Console error when exiting query builder #3523

maxpatiiuk opened this issue May 22, 2023 · 2 comments · Fixed by #3546
Assignees
Labels
1 - Bug Incorrect behavior of the product

Comments

@maxpatiiuk
Copy link
Member

  1. Open production branch
  2. Open query builder
  3. Add any field
  4. Open any other page
  5. See an error in the console

Screenshot 2023-05-22 at 12 43 38

Hint

Turns out the value of mirror is not always of type Element | null.

Solution

Replace:

      const mirror = (
        sortable as unknown as { readonly mirror: Element | null }
      ).mirror;
      if (mirror !== null) mirror.parentNode?.removeChild(mirror);

with:

      const mirror = (
        sortable as unknown as { readonly mirror?: Element | null }
      ).mirror;
      mirror?.parentNode?.removeChild(mirror);

@maxpatiiuk maxpatiiuk added the 1 - Bug Incorrect behavior of the product label May 22, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Front-End Backlog May 22, 2023
@melton-jason
Copy link
Contributor

It appears there was a typo in this issue's title.
Is it supposed to be 'Console error when exiting query builder'?

@maxpatiiuk maxpatiiuk changed the title Console error when existing query builder Console error when exiting query builder May 22, 2023
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Front-End Backlog May 31, 2023
@specifysoftware
Copy link

This issue has been mentioned on Specify Community Forum. There might be relevant details there:

https://discourse.specifysoftware.org/t/specify-7-8-12-release-announcement/1202/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Bug Incorrect behavior of the product
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants