get rid of feel-good code
This commit is contained in:
@@ -46,26 +46,9 @@ define([], function () {
|
|||||||
transactionService.startTransaction();
|
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(
|
transactionService.addToTransaction(
|
||||||
unlistenAndCall(persistence.persist.bind(persistence)),
|
persistence.persist.bind(persistence),
|
||||||
unlistenAndCall(persistence.refresh.bind(persistence))
|
persistence.refresh.bind(persistence)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!wasActive) {
|
if (!wasActive) {
|
||||||
|
|||||||
Reference in New Issue
Block a user