[KED-2266] Fix error when changing pipeline and hovering nodes in Safari #306
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is a quick patch fix for KED-2266 (https://jira.quantumblack.com/browse/KED-2266), which is a bug in loading node data when changing pipelines on safari.
Development notes
The problem is caused by a series of
undefined
values within theallNodes
array ( see below ).While the cause of the issue might be related to the wider setup of the new multiple pipeline feature, a simple patch fix of applying a filter to filter out any
undefined
nodes to the list of aggregated nodes is applied in definingallNodes
within the draw feature of flowchart.I have not included a test given this is just a quick patch fix while we currently don't have any test set up for testing D3 rendering within the draw feature, however it might be worth to look into setting up further tests to test D3 rendering function to capture cases such as this.
Thank you @bru5 for your help and context on this bug!
QA notes
The bug can be reproduced via changing pipelines and hovering on the nodes in the flowchart diagram. I have performed a quick regression test on testing the rendering of the chart on switching between pipelines, but it would be good for ay extra pair of eyes to capture any potential error as well.
Checklist
RELEASE.md
fileLegal notice
I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":
I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.
I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.