mirror of
https://github.com/nasa/openmct.git
synced 2024-12-21 14:07:50 +00:00
[Edit] Cancel action depends on promise resolution
Cancel action no longer cares about return value, simply will not execute if navigtion promise does not resolve. https://github.com/nasa/openmct/issues/1360
This commit is contained in:
parent
fcda211800
commit
6328bd9354
@ -56,13 +56,13 @@ define(
|
||||
//navigate back to parent because nothing to show.
|
||||
return domainObject.getCapability("location").getOriginal().then(function (original) {
|
||||
parent = original.getCapability("context").getParent();
|
||||
parent.getCapability("action").perform("navigate");
|
||||
return parent.getCapability("action").perform("navigate");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function cancel(allowed) {
|
||||
return allowed && domainObject.getCapability("editor").finish();
|
||||
function cancel() {
|
||||
return domainObject.getCapability("editor").finish();
|
||||
}
|
||||
|
||||
//Do navigation first in order to trigger unsaved changes dialog
|
||||
|
Loading…
Reference in New Issue
Block a user