reactronic 0.21.522 → 0.21.523
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,6 +30,7 @@ class OperationController extends Controller_1.Controller {
|
|
|
30
30
|
markObsolete() { Transaction_1.Transaction.runAs({ hint: Dbg_1.Dbg.isOn ? `markObsolete(${Snapshot_1.Dump.obj(this.ownHolder, this.memberName)})` : 'markObsolete()' }, OperationController.markObsolete, this); }
|
|
31
31
|
pullLastResult(args) { return this.useOrRun(true, args).value; }
|
|
32
32
|
useOrRun(weak, args) {
|
|
33
|
+
var _a;
|
|
33
34
|
let oc = this.peek(args);
|
|
34
35
|
const ctx = oc.snapshot;
|
|
35
36
|
const op = oc.operation;
|
|
@@ -37,7 +38,9 @@ class OperationController extends Controller_1.Controller {
|
|
|
37
38
|
if (!oc.isUpToDate && oc.revision.data[Data_1.Meta.Disposed] === undefined
|
|
38
39
|
&& (!weak || op.cause === ROOT_TRIGGER || !op.successor ||
|
|
39
40
|
op.successor.transaction.isFinished)) {
|
|
41
|
+
const outerOpts = (_a = Operation.current) === null || _a === void 0 ? void 0 : _a.options;
|
|
40
42
|
const standalone = weak || opts.kind === Options_1.Kind.Reaction ||
|
|
43
|
+
(opts.kind === Options_1.Kind.Transaction && outerOpts && (outerOpts.noSideEffects || outerOpts.kind === Options_1.Kind.Cache)) ||
|
|
41
44
|
(opts.kind === Options_1.Kind.Cache && (oc.revision.snapshot.sealed ||
|
|
42
45
|
oc.revision.prev.revision !== Snapshot_1.ROOT_REV));
|
|
43
46
|
const token = opts.noSideEffects ? this : undefined;
|