-
Notifications
You must be signed in to change notification settings - Fork 6
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
Phoenix bugfix for undefined outputFormat
#1556
Phoenix bugfix for undefined outputFormat
#1556
Conversation
Tracking it back to the source - aerie-ui/src/stores/sequence-adaptation.ts Lines 44 to 47 in 210d9c8
Somehow |
Yes, an initialization issue is my best understanding. It's initialized undefined:
...and it seems to be nominally set by aerie-ui/src/components/sequencing/SequenceEditor.svelte Lines 113 to 115 in b99e922
...and my understanding is that, even though I don't define ...which is SeqJson, as I'd hope: aerie-ui/src/stores/sequence-adaptation.ts Lines 23 to 29 in b99e922
|
That's as far as I dug; I could keep reading through the source, but I expect a Phoenix dev would be better equipped to clarify design intent vs. current behavior. |
It's intended that |
@cartermak It looks like you're working off an older version of the codebase. Would you be able to pull in the latest and see if it's still occurring for you? (I don't think we explicitly had a fix for this) |
@duranb thanks for that clarification. In this case, Re: codebase version, I can try on develop; I found the bug trying to get Clipper set up on 3.1.0, so I branched from the tag for now. |
Would initializing it to the empty list count as addressing the root cause? - let outputFormats: IOutputFormat[];
+ let outputFormats: IOutputFormat[] = []; |
@duranb tested and I still see the behavior on @mattdailis tried that and it works too, but I haven't scanned the code to see whether anything is expecting to find |
@cartermak Ohh. Got it. Now I see it. You're correct.
@mattdailis That would be a good fix! |
Sorry I missed this whole conversation, yeah the thought was it should never be undefined if you're providing an adaptation but that still should be a valid code path. |
outputFormats is derived from sequencing language adaptation, but starts out as undefined. This commit protects any code that assumes it's always a list.
210d9c8
to
a6b6194
Compare
Pair-reviewed with @dandelany |
Initialize outputFormats to the empty list outputFormats is derived from sequencing language adaptation, but starts out as undefined. This commit protects any code that assumes it's always a list. Co-authored-by: Matthew Dailis <[email protected]>
See #1555
Possible fix seems to work locally for me, but it's unclear whether this is a "bug" or whether I should fix something in my adaptation.