Skip to content

Commit

Permalink
Fixed all execution flows with clientoperations
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleeckx committed Feb 1, 2017
1 parent 050c74a commit 8455c8f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Libs/Vidyano/vidyano.ts
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,11 @@ namespace Vidyano {
this._setProfiledRequests(requests.slice(0, 20));
}

if (result.operations) {
this._queuedClientOperations.push(...result.operations);
result.operations = null;
}

if (this._queuedClientOperations.length > 0) {
setTimeout(() => {
let operation: ClientOperations.IClientOperation;
Expand Down Expand Up @@ -1118,8 +1123,10 @@ namespace Vidyano {
parent.freeze();

const executeThen: (QueryResultItem: any) => Promise<Vidyano.PersistentObject> = async result => {
if (result.operations)
if (result.operations) {
this._queuedClientOperations.push(...result.operations);
result.operations = null;
}

if (!result.retry)
return result.result ? await this.hooks.onConstructPersistentObject(this, result.result) : null;
Expand Down

0 comments on commit 8455c8f

Please sign in to comment.