DescriptionFix error while removing relations.
When removing a relation sometimes an exception
is raised: "Uncaught TypeError: Cannot call method
'one' of null".
I was able to reproduce the bug following these steps:
1) click on a relation, the remove relation modal
dialog appears;
2) open the GUI in another tab, and force a delta stream
event (e.g. add/remove another relation,
destroy a service...);
3) on delta, the relation nodes are redrawn on both tabs,
so the element stored in the dialog no longer exists
in the DOM;
4) on the first tab, click to confirm the relation removal,
you'll see the error.
In this branch, the relation node is retrieved again in
removeRelation using its relation id. This way we ensure
the element actually exists in the DOM.
https://code.launchpad.net/~frankban/juju-gui/bug-1103204-remove-relation/+merge/144484
(do not edit description out of merge proposal)
Patch Set 1 #Patch Set 2 : Fix error while removing relations. #
MessagesTotal messages: 4
|