mol_dump_lib 0.0.1042 → 0.0.1044

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/node.js CHANGED
@@ -7189,13 +7189,14 @@ var $;
7189
7189
  }
7190
7190
  static direction() {
7191
7191
  const lang = this.lang();
7192
+ let direction;
7192
7193
  try {
7193
- return new Intl.Locale(lang).getTextInfo().direction ?? 'ltr';
7194
+ direction = new Intl.Locale(lang).getTextInfo().direction;
7194
7195
  }
7195
7196
  catch (e) {
7196
7197
  $mol_fail_log(e);
7197
- return this.langs_rtl().includes(lang) ? 'rtl' : 'ltr';
7198
7198
  }
7199
+ return direction ?? (this.langs_rtl().includes(lang) ? 'rtl' : 'ltr');
7199
7200
  }
7200
7201
  static source(lang) {
7201
7202
  return JSON.parse(this.$.$mol_file.relative(`web.locale=${lang}.json`).text().toString());