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

fix: Disable logging unknown data-type in console #1189

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

manzt
Copy link
Member

@manzt manzt commented Dec 4, 2023

Description

For whatever reason, the evtJson is often a boolean here:

    if (!(datatype in DEFAULT_TRACKS_FOR_DATATYPE) && !evtJson.defaultTracks) {
      console.warn('unknown data type:', evtJson.higlassTrack);
      return undefined;
    }

and therefore evtJson.defaultTracks is undefined, leading to the console erroring:

unknown data type: undefined

consistently.

What was changed in this pull request?

I've seen this log for ages in both Gosling.js and HiGlass but never had the time to
look very deeply into it.

Why is it necessary?

Fixes #___

Checklist

  • Set proper GitHub labels (e.g. v1.6+, ignore if you don't know)
  • Unit tests added or updated
  • Documentation added or updated
  • Example(s) added or updated
  • Update schema.json if there are changes to the viewconf JSON structure format
  • Screenshot for visual changes (e.g. new tracks or UI changes)
  • Updated CHANGELOG.md

@manzt manzt merged commit b64b872 into develop Dec 19, 2023
4 checks passed
@manzt manzt deleted the manzt/fix-annoying-log branch December 19, 2023 18:49
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.

None yet

1 participant