@bpmn-io/form-js-editor 1.0.0-alpha.4 → 1.0.0-alpha.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.
package/dist/index.es.js CHANGED
@@ -9588,8 +9588,12 @@ class SectionModuleBase {
9588
9588
  constructor(eventBus, sectionKey) {
9589
9589
  this._eventBus = eventBus;
9590
9590
  this._sectionKey = sectionKey;
9591
- this._eventBus.on(`${this._sectionKey}.section.rendered`, () => this.isSectionRendered = true);
9592
- this._eventBus.on(`${this._sectionKey}.section.destroyed`, () => this.isSectionRendered = false);
9591
+ this._eventBus.on(`${this._sectionKey}.section.rendered`, () => {
9592
+ this.isSectionRendered = true;
9593
+ });
9594
+ this._eventBus.on(`${this._sectionKey}.section.destroyed`, () => {
9595
+ this.isSectionRendered = false;
9596
+ });
9593
9597
  }
9594
9598
 
9595
9599
  /**
@@ -9624,11 +9628,7 @@ class SectionModuleBase {
9624
9628
  if (this.isSectionRendered) {
9625
9629
  callback();
9626
9630
  } else {
9627
- const onSectionRendered = () => {
9628
- callback();
9629
- this._eventBus.off(`${this._sectionKey}.section.rendered`, onSectionRendered);
9630
- };
9631
- this._eventBus.on(`${this._sectionKey}.section.rendered`, onSectionRendered);
9631
+ this._eventBus.once(`${this._sectionKey}.section.rendered`, callback);
9632
9632
  }
9633
9633
  }
9634
9634
  }