Skip to content

About node visibility check #490

Closed Answered by akifsonmez
akifsonmez asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you, I fixed it by adding a type assertion.

// Since I am sure I provided a tab node ID, I can use a type assertion
const node = model.getNodeById("tab-node-id") as TabNode | undefined;

if (!node?.isVisible()) {
    model.doAction(Actions.selectTab("tab-node-id"));
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@akifsonmez
Comment options

Answer selected by akifsonmez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants