From 8455c8f65a5cc29559b9fe4825adc5cb4420ce83 Mon Sep 17 00:00:00 2001 From: David Sleeckx Date: Wed, 1 Feb 2017 14:15:33 +0100 Subject: [PATCH] Fixed all execution flows with clientoperations --- src/Libs/Vidyano/vidyano.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Libs/Vidyano/vidyano.ts b/src/Libs/Vidyano/vidyano.ts index aa06534b..86da59cc 100644 --- a/src/Libs/Vidyano/vidyano.ts +++ b/src/Libs/Vidyano/vidyano.ts @@ -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; @@ -1118,8 +1123,10 @@ namespace Vidyano { parent.freeze(); const executeThen: (QueryResultItem: any) => Promise = 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;