Skip to content

Fix console errors when running from source in development#2640

Merged
sensei-hacker merged 1 commit into
iNavFlight:maintenance-9.xfrom
sensei-hacker:fix/search-dynamic-import-errors
May 27, 2026
Merged

Fix console errors when running from source in development#2640
sensei-hacker merged 1 commit into
iNavFlight:maintenance-9.xfrom
sensei-hacker:fix/search-dynamic-import-errors

Conversation

@sensei-hacker
Copy link
Copy Markdown
Member

Summary

Eliminates two spurious console errors that appear every time the configurator is run from an untagged source checkout.

Changes

tabs/search.js — Add jslessTab exclusion set for tabs that have no .js file (debug_trace, options). Their JS import is now skipped; HTML indexing still runs normally, so search results for those tabs are unaffected.

js/appUpdater.js — Wrap the semver.gt() comparison in a try/catch so builds with non-semver version strings (e.g. untagged-<hash> from git-describe) silently skip the update check instead of throwing an uncaught TypeError.

Errors eliminated

search.js:145 Failed to index JS for tab debug_trace: Error: Unknown variable dynamic import: ./debug_trace.js
search.js:145 Failed to index JS for tab options: Error: Unknown variable dynamic import: ./options.js
Uncaught TypeError: Invalid Version: untagged-58a74ccc453672f866b7  (appUpdater.js)

Testing

Verified in development mode (yarn start) — both errors no longer appear in DevTools console. Update check still works correctly for release builds with valid semver versions.

Two spurious errors appeared every time the configurator ran from an
untagged source checkout:

- search.js logged "Failed to index JS for tab debug_trace/options"
  because those tabs have no .js file. Add a jslessTab exclusion set
  so their JS import is skipped; HTML indexing still runs normally.

- appUpdater.js threw an uncaught TypeError from semver.gt() when the
  running version was an untagged git-describe string rather than a
  valid semver. Wrap the comparison in try/catch so non-release builds
  silently skip the update check.
@qodo-code-review
Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@sensei-hacker sensei-hacker merged commit 0d69a45 into iNavFlight:maintenance-9.x May 27, 2026
7 of 8 checks passed
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 this pull request may close these issues.

1 participant