@spiffcommerce/core 16.2.3-rc.0 → 16.2.4

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.js CHANGED
@@ -5471,15 +5471,19 @@ class Xa {
5471
5471
  const E = l.map((m) => new $(m.id)), C = new de(this.constructSerializableWorkflow()), Q = [...w, ...E, C];
5472
5472
  Q.length > 0 && this.commandContext.apply(new G(Q), !0), await this.ensureStepsAreLoaded(), this.onElementsChange();
5473
5473
  const u = this.getInvalidModelVariants(), p = this.modelContainer;
5474
- p && u.forEach((m) => {
5475
- p.applyModelVariant(
5476
- m,
5477
- {
5478
- contextService: this.getLayoutPreviewService()
5479
- },
5480
- !1
5474
+ if (p) {
5475
+ const m = u.map(
5476
+ (I) => p.applyModelVariant(
5477
+ I,
5478
+ {
5479
+ contextService: this.getLayoutPreviewService()
5480
+ },
5481
+ !1
5482
+ )
5481
5483
  );
5482
- }), await this.onSelectionChange(), a && await a();
5484
+ await Promise.all(m);
5485
+ }
5486
+ await this.onSelectionChange(), a && await a();
5483
5487
  }
5484
5488
  async ensureStepsAreLoaded() {
5485
5489
  var o, c;