@magic-xpa/angular 4.1300.0-dev4130.309 → 4.1300.0-dev4130.311

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.
@@ -3518,10 +3518,10 @@ class AccessorMagicService {
3518
3518
  */
3519
3519
  // mgGetTabpageText
3520
3520
  getTabpageText(controlId, layer) {
3521
+ // The items list is "" until the engine sends it (e.g. on the first render of an overlay),
3522
+ // and can be shorter than the tabs in the template when the Visible Layers List hides layers.
3521
3523
  const items = this.task.getProperty(controlId, HtmlProperties.ItemsList);
3522
- if (typeof items !== "undefined")
3523
- return items[layer].displayValue;
3524
- return "";
3524
+ return items?.[layer]?.displayValue ?? "";
3525
3525
  }
3526
3526
  /**
3527
3527
  * Gets the image defined for the control