@zhongguo168a/yxeditor-common 0.0.143 → 0.0.146

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.
package/dist/index.esm.js CHANGED
@@ -4488,17 +4488,23 @@ class ViewModel extends EventDispatcher {
4488
4488
  waitOpenComplete(...params) {
4489
4489
  return __awaiter(this, void 0, void 0, function* () {
4490
4490
  this._waitOpenComplete = true;
4491
+ let err;
4491
4492
  for (const element of params) {
4492
- let err = yield element();
4493
+ err = yield element();
4493
4494
  if (err) {
4494
- return err;
4495
+ break;
4495
4496
  }
4496
4497
  if (this.state == ViewState.Closed || this.state == ViewState.Closeing) {
4497
4498
  return;
4498
4499
  }
4499
4500
  }
4500
- if (params.length > 0) {
4501
- this.openComplete();
4501
+ if (err) {
4502
+ this.close();
4503
+ }
4504
+ else {
4505
+ if (params.length > 0) {
4506
+ this.openComplete();
4507
+ }
4502
4508
  }
4503
4509
  });
4504
4510
  }