mirror of https://github.com/status-im/consul.git
ui: Add an isDestroyed check for the MenuPanel component (#11104)
This solves an occasionally flakey tests I see every so often
This commit is contained in:
parent
e088d8674c
commit
ececa7da45
|
@ -12,6 +12,7 @@ export default Component.extend(Slotted, {
|
||||||
actions: {
|
actions: {
|
||||||
connect: function($el) {
|
connect: function($el) {
|
||||||
next(() => {
|
next(() => {
|
||||||
|
if(!this.isDestroyed) {
|
||||||
// if theres only a single choice in the menu and it doesn't have an
|
// if theres only a single choice in the menu and it doesn't have an
|
||||||
// immediate button/link/label to click then it will be a
|
// immediate button/link/label to click then it will be a
|
||||||
// confirmation/informed action
|
// confirmation/informed action
|
||||||
|
@ -20,6 +21,7 @@ export default Component.extend(Slotted, {
|
||||||
$el
|
$el
|
||||||
);
|
);
|
||||||
set(this, 'isConfirmation', typeof isConfirmationMenu !== 'undefined');
|
set(this, 'isConfirmation', typeof isConfirmationMenu !== 'undefined');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
change: function(e) {
|
change: function(e) {
|
||||||
|
|
Loading…
Reference in New Issue