Skip to content

Commit aede814

Browse files
trungnotchungsfroment
authored andcommitted
update logic
1 parent 72ba4ae commit aede814

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

packages/object/src/index.ts

+11-6
Original file line numberDiff line numberDiff line change
@@ -268,18 +268,23 @@ export class DRPObject implements DRPObjectBase {
268268
try {
269269
this.validateVertex(vertex);
270270
const preComputeLca = this.computeLCA(vertex.dependencies);
271-
const drp = this._computeDRP(
272-
vertex.dependencies,
273-
preComputeLca,
274-
vertex.operation.drpType === DrpType.DRP ? vertex.operation : undefined
275-
);
271+
272+
if (this.drp) {
273+
const drp = this._computeDRP(
274+
vertex.dependencies,
275+
preComputeLca,
276+
vertex.operation.drpType === DrpType.DRP ? vertex.operation : undefined
277+
);
278+
this._setDRPState(vertex, preComputeLca, this._getDRPState(drp));
279+
}
280+
276281
const acl = this._computeObjectACL(
277282
vertex.dependencies,
278283
preComputeLca,
279284
vertex.operation.drpType === DrpType.ACL ? vertex.operation : undefined
280285
);
281-
this._setDRPState(vertex, preComputeLca, this._getDRPState(drp));
282286
this._setObjectACLState(vertex, preComputeLca, this._getDRPState(acl));
287+
283288
this.hashGraph.addVertex(vertex);
284289
this._initializeFinalityState(vertex.hash, acl);
285290
newVertices.push(vertex);

0 commit comments

Comments
 (0)