mol_view_tree2_lib 1.0.216 → 1.0.217

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/web.mjs CHANGED
@@ -5548,13 +5548,14 @@ var $;
5548
5548
  }
5549
5549
  static direction() {
5550
5550
  const lang = this.lang();
5551
+ let direction;
5551
5552
  try {
5552
- return new Intl.Locale(lang).getTextInfo().direction ?? 'ltr';
5553
+ direction = new Intl.Locale(lang).getTextInfo().direction;
5553
5554
  }
5554
5555
  catch (e) {
5555
5556
  $mol_fail_log(e);
5556
- return this.langs_rtl().includes(lang) ? 'rtl' : 'ltr';
5557
5557
  }
5558
+ return direction ?? (this.langs_rtl().includes(lang) ? 'rtl' : 'ltr');
5558
5559
  }
5559
5560
  static source(lang) {
5560
5561
  return JSON.parse(this.$.$mol_file.relative(`web.locale=${lang}.json`).text().toString());