Skip to content

Conversation

@weswigham
Copy link
Member

Fixes our nightly publish, which requires a clean post-LKG build. Looks like #50528 missed an instance of enum narrowing behaviors changing a bit in our own codebase between when it was made and when it was merged.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Nov 7, 2022
const left = column > 0 ? connectors[column - 1][lane] : 0;
const above = lane > 0 ? connectors[column][lane - 1] : 0;
let connector = connectors[column][lane];
if (!connector) {
Copy link
Member

@jakebailey jakebailey Nov 7, 2022

Choose a reason for hiding this comment

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

I actually fixed this on the module branch another way, to add a None = 0 value to the enum instead, that way it's not never.

Copy link
Member

Choose a reason for hiding this comment

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

(Also thankfully post-modules I ensure all projects get checked, so we should catch these.)

Copy link
Member

Choose a reason for hiding this comment

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

Though, I think both aren't quite right anyhow given I think what this is checking is not 0, but undefined via out-of-bounds.

const left = column > 0 ? connectors[column - 1][lane] : 0;
const above = lane > 0 ? connectors[column][lane - 1] : 0;
let connector = connectors[column][lane];
if (!connector) {
Copy link
Member

Choose a reason for hiding this comment

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

Though, I think both aren't quite right anyhow given I think what this is checking is not 0, but undefined via out-of-bounds.

@weswigham weswigham merged commit d83a5e1 into microsoft:main Nov 7, 2022
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants