@brightspace-ui/core 2.60.1 → 2.60.3

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.
@@ -203,7 +203,8 @@ export const DialogMixin = superclass => class extends RtlMixin(superclass) {
203
203
  if (!this.shadowRoot) return;
204
204
  const content = this.shadowRoot.querySelector('.d2l-dialog-content');
205
205
  if (content) {
206
- const elementToFocus = this._findAutofocusElement(content) ?? getNextFocusable(content);
206
+ const autofocusElem = this._findAutofocusElement(content);
207
+ const elementToFocus = autofocusElem ? autofocusElem : getNextFocusable(content);
207
208
  if (isComposedAncestor(this.shadowRoot.querySelector('.d2l-dialog-inner'), elementToFocus)) {
208
209
  forceFocusVisible(elementToFocus, false);
209
210
  return;
@@ -34,7 +34,7 @@ export const SelectionObserverMixin = superclass => class extends superclass {
34
34
  requestAnimationFrame(() => {
35
35
  if (this.selectionFor) {
36
36
  this._handleSelectionFor();
37
- return this._provider?.subscribeObserver(this);
37
+ return this._provider ? this._provider.subscribeObserver(this) : undefined;
38
38
  }
39
39
 
40
40
  const evt = new CustomEvent('d2l-selection-observer-subscribe', {
@@ -130,7 +130,7 @@ export const LocalizeMixin = dedupeMixin(superclass => class extends superclass
130
130
 
131
131
  static _generatePossibleLanguages(config) {
132
132
 
133
- if (config?.useBrowserLangs) return navigator.languages.map(e => e.toLowerCase()).concat('en');
133
+ if (config && config.useBrowserLangs) return navigator.languages.map(e => e.toLowerCase()).concat('en');
134
134
 
135
135
  const { language, fallbackLanguage } = this.documentLocaleSettings;
136
136
  const langs = [ language, fallbackLanguage ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.60.1",
3
+ "version": "2.60.3",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",