Fixed #3809 - The esm builds throw an exception due to optional chaining
parent
ad6b71074a
commit
a526e8f1b5
|
@ -160,7 +160,7 @@ function switchTheme(currentTheme, newTheme, linkElementId, callback) {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
linkElement.parentNode?.insertBefore(cloneLinkElement, linkElement.nextSibling);
|
linkElement.parentNode && linkElement.parentNode.insertBefore(cloneLinkElement, linkElement.nextSibling);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -231,7 +231,7 @@ export default {
|
||||||
},
|
},
|
||||||
scrollTo(options) {
|
scrollTo(options) {
|
||||||
this.lastScrollPos = this.both ? { top: 0, left: 0 } : 0;
|
this.lastScrollPos = this.both ? { top: 0, left: 0 } : 0;
|
||||||
this.element?.scrollTo(options);
|
this.element && this.element.scrollTo(options);
|
||||||
},
|
},
|
||||||
scrollToIndex(index, behavior = 'auto') {
|
scrollToIndex(index, behavior = 'auto') {
|
||||||
const both = this.isBoth();
|
const both = this.isBoth();
|
||||||
|
|
Loading…
Reference in New Issue