Skip to content

Commit

Permalink
Fixed #3809 - The esm builds throw an exception due to optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Mar 27, 2023
1 parent ad6b710 commit a526e8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/lib/config/PrimeVue.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function switchTheme(currentTheme, newTheme, linkElementId, callback) {
callback();
}
});
linkElement.parentNode?.insertBefore(cloneLinkElement, linkElement.nextSibling);
linkElement.parentNode && linkElement.parentNode.insertBefore(cloneLinkElement, linkElement.nextSibling);
}

export default {
Expand Down
2 changes: 1 addition & 1 deletion components/lib/virtualscroller/VirtualScroller.vue
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export default {
},
scrollTo(options) {
this.lastScrollPos = this.both ? { top: 0, left: 0 } : 0;
this.element?.scrollTo(options);
this.element && this.element.scrollTo(options);
},
scrollToIndex(index, behavior = 'auto') {
const both = this.isBoth();
Expand Down

0 comments on commit a526e8f

Please sign in to comment.