@rimelight/ui 0.0.35 → 0.0.36

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rimelight/ui",
3
- "version": "0.0.35",
3
+ "version": "0.0.36",
4
4
  "private": false,
5
5
  "description": "Rimelight Entertainment UI Library.",
6
6
  "keywords": [
@@ -112,14 +112,13 @@ const selectUi = {
112
112
  class RLALocaleSelector extends HTMLElement {
113
113
  connectedCallback() {
114
114
  this.style.display = 'contents';
115
- const hiddenInput = this.querySelector('[data-select-hidden-input]') as HTMLInputElement | null;
116
- if (!hiddenInput) return;
117
-
118
- hiddenInput.addEventListener('change', (event) => {
115
+ this.addEventListener('change', (event) => {
119
116
  const target = event.target as HTMLInputElement;
120
- const targetUrl = target.value;
121
- if (targetUrl) {
122
- window.location.href = targetUrl;
117
+ if (target && target.hasAttribute('data-select-hidden-input')) {
118
+ const targetUrl = target.value;
119
+ if (targetUrl) {
120
+ window.location.href = targetUrl;
121
+ }
123
122
  }
124
123
  });
125
124
  }