get rid of feel-good code

This commit is contained in:
Pete Richards 2016-11-08 16:07:53 -08:00
parent 66a6b6d89b
commit b169089156

View File

@ -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) {