Skip to content

Commit

Permalink
fix(View2DProxy): add check for rep before binding
Browse files Browse the repository at this point in the history
The argument of `bindRepresentationToManipulator` should be a proxy
Add a test to ensure that it is indeed a proxy in `addRepresentation`
  • Loading branch information
bruyeret authored and finetjul committed Oct 17, 2023
1 parent 5e6191a commit e09614c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/Proxy/Core/View2DProxy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ function vtkView2DProxy(publicAPI, model) {

publicAPI.bindRepresentationToManipulator = (representation) => {
let nbListeners = 0;
if (!representation.getProxyId) {
return nbListeners;
}
model.rangeManipulator.removeAllListeners();
model.sliceRepresentation = representation;
while (model.sliceRepresentationSubscriptions.length) {
Expand Down

0 comments on commit e09614c

Please sign in to comment.