Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nasa/openmct.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Woeltjen <victor.woeltjen@nasa.gov>2016-07-27 01:30:40 +0300
committerVictor Woeltjen <victor.woeltjen@nasa.gov>2016-07-27 01:32:59 +0300
commit771542ee5f7a7d60f2bb247d58c6e609b8dc7ca8 (patch)
tree5e25138dcbc0387ac2192bd0ac74178dd982ba78
parentb60eff2f5ecfc41a541429902f2a9bd15399cd23 (diff)
[Persistence] Reliably return promisespersist-on-mutation-825b
-rw-r--r--platform/commonUI/edit/src/services/TransactionService.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/commonUI/edit/src/services/TransactionService.js b/platform/commonUI/edit/src/services/TransactionService.js
index 50b17f563..7697eed43 100644
--- a/platform/commonUI/edit/src/services/TransactionService.js
+++ b/platform/commonUI/edit/src/services/TransactionService.js
@@ -89,7 +89,7 @@ define(
TransactionService.prototype.commit = function () {
var transaction = this.transaction;
this.transaction = this.transactionStack.pop();
- return transaction && transaction.commit();
+ return transaction ? transaction.commit() : Promise.reject();
};
/**
@@ -103,7 +103,7 @@ define(
TransactionService.prototype.cancel = function () {
var transaction = this.transaction;
this.transaction = this.transactionStack.pop();
- return transaction && transaction.cancel();
+ return transaction ? transaction.cancel() : Promise.reject();
};
TransactionService.prototype.size = function () {