@smartbit4all/ng-client 7.0.4 → 7.0.5

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.
@@ -4864,7 +4864,9 @@ class SmartViewContextService {
4864
4864
  }
4865
4865
  async load2(uuid) {
4866
4866
  let change = await this.view.getComponentModel2(uuid).toPromise();
4867
- this.handlePerformActionResponse(change);
4867
+ // Not awaited: the sync ends with a viewcontext PUT, which would serialise the mount.
4868
+ // The failure still has to surface, so log it instead of dropping the promise.
4869
+ this.handlePerformActionResponse(change).catch((err) => console.error('syncView after component load failed', err));
4868
4870
  return change;
4869
4871
  }
4870
4872
  getCurrentViewContext() {
@@ -15828,6 +15830,18 @@ class SmartComponentApiClient {
15828
15830
  this.changeDetector?.detectChanges();
15829
15831
  }
15830
15832
  async run() {
15833
+ if (this.runInFlight && this.runInFlight.uuid === this.uuid) {
15834
+ return this.runInFlight.promise;
15835
+ }
15836
+ const promise = this.doRun().finally(() => {
15837
+ if (this.runInFlight?.promise === promise) {
15838
+ this.runInFlight = undefined;
15839
+ }
15840
+ });
15841
+ this.runInFlight = { uuid: this.uuid, promise };
15842
+ return promise;
15843
+ }
15844
+ async doRun() {
15831
15845
  try {
15832
15846
  await this.bootstrap.whenReady();
15833
15847
  await this.load();