Skip to content

Small fix for potential js error when rendering locally-stored export data.#521

Open
clintonium-119 wants to merge 5 commits into
developfrom
local-data-source
Open

Small fix for potential js error when rendering locally-stored export data.#521
clintonium-119 wants to merge 5 commits into
developfrom
local-data-source

Conversation

@clintonium-119

@clintonium-119 clintonium-119 commented Jan 21, 2026

Copy link
Copy Markdown
Member

Supports using the local/rawData.json that we use for viz dataUtil exporation withing Tidepool Web patient data views

Related PRs:
tidepool-org/blip#1846
tidepool-org/viz#584

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a potential runtime error when rendering annotations from locally-stored export data (e.g., rawData.json) by safely handling missing code fields.

Changes:

  • Guarded stats- prefix checks against missing annotation.code via optional chaining in the annotations renderer.
  • Bumped the package version to a local-data focused prerelease identifier.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
package.json Updates version string to reflect the local data source fix.
js/plot/util/annotations/annotation.js Prevents TypeError from calling .slice() when annotations[0].code is missing/null by using optional chaining.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants