Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Network: Prevent crash when dataChanged is triggered during initialization #3568

Merged
merged 2 commits into from
Oct 13, 2017

Conversation

wimrijnders
Copy link
Contributor

Fixes #3562.

Options hidden and physics can emit a _dataChanged event within setOptions().
If this happens when setting options during the initialization of the Network instance, this leads
to an error thrown, because there is no DataSet instance connected yet to the instance.

This bug was introduced in v4.21.0. Unit tests have been added for this case.

…etting of options

Fixes almende#3562.

Options `hidden` and `physics` can emit a `_dataChanged` event within `setOptions()`.
If this happens when setting options during the initialization of the `Network` instance, this leads
to an error thrown, because there is no DataSet instance  connected yet to the instance.

This bug was introduced in `v4.21.0`. Unit tests have been added for this case.
@wimrijnders wimrijnders changed the title Network: Prevent crash when dataChanged is triggered during initializatioin Network: Prevent crash when dataChanged is triggered during initialization Oct 13, 2017
@yotamberk yotamberk merged commit f6445cd into almende:develop Oct 13, 2017
@wimrijnders wimrijnders deleted the issue3562 branch October 13, 2017 16:57
mojoaxel pushed a commit to visjs/vis_original that referenced this pull request Jun 9, 2019
…ation (almende#3568)

* Network: Prevent crash when dataChanged is triggered during initial setting of options

Fixes almende#3562.

Options `hidden` and `physics` can emit a `_dataChanged` event within `setOptions()`.
If this happens when setting options during the initialization of the `Network` instance, this leads
to an error thrown, because there is no DataSet instance  connected yet to the instance.

This bug was introduced in `v4.21.0`. Unit tests have been added for this case.

* Edited comment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants