Skip to content

Conversation

@mayorovad
Copy link

Summary
Because overlays field of Cell is now initialized with empty array instead of undefined, code from examples is broken.

// used by addCellOverlay() of mxGraph
overlays: CellOverlay[] = [];

const overlays = graph.getCellOverlays(cell);
if (overlays == null) {

This branch will never execute.

Changed check for null to check for empty array.

Description for the changelog
Fix stories with overlays usage

@tbouffard tbouffard added the bug Something isn't working label Oct 7, 2022
Copy link
Member

@tbouffard tbouffard left a comment

Choose a reason for hiding this comment

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

Nice catch! Thanks for all the PR you provide 💯 .

@tbouffard tbouffard merged commit f08b041 into maxGraph:development Oct 10, 2022
@mayorovad mayorovad deleted the overlays-stories-fix branch October 13, 2022 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants