From b1690891569a3e74c93c8958027adf754e8a693d Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Tue, 8 Nov 2016 16:07:53 -0800 Subject: [PATCH] get rid of feel-good code --- .../src/runs/TransactingMutationListener.js | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/platform/core/src/runs/TransactingMutationListener.js b/platform/core/src/runs/TransactingMutationListener.js index 274f983b26..16319f73cd 100644 --- a/platform/core/src/runs/TransactingMutationListener.js +++ b/platform/core/src/runs/TransactingMutationListener.js @@ -46,26 +46,9 @@ define([], function () { transactionService.startTransaction(); } - if (!MUTATION_TRACKER.has(domainObject)) { - MUTATION_TRACKER.set(domainObject, domainObject - .getCapability('mutation') - .listen(function () {}) - ); - } - - function unlistenAndCall(f) { - return function () { - if (MUTATION_TRACKER.has(domainObject)) { - MUTATION_TRACKER.get(domainObject)(); - MUTATION_TRACKER.delete(domainObject); - } - return f(); - } - } - transactionService.addToTransaction( - unlistenAndCall(persistence.persist.bind(persistence)), - unlistenAndCall(persistence.refresh.bind(persistence)) + persistence.persist.bind(persistence), + persistence.refresh.bind(persistence) ); if (!wasActive) {