From a526e8f1b5152899c869078c77b2191fd7719502 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Mon, 27 Mar 2023 12:00:48 +0100 Subject: [PATCH 1/2] Fixed #3809 - The esm builds throw an exception due to optional chaining --- components/lib/config/PrimeVue.js | 2 +- components/lib/virtualscroller/VirtualScroller.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lib/config/PrimeVue.js b/components/lib/config/PrimeVue.js index b10d0e4e4..6f2b2e0a7 100644 --- a/components/lib/config/PrimeVue.js +++ b/components/lib/config/PrimeVue.js @@ -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 { diff --git a/components/lib/virtualscroller/VirtualScroller.vue b/components/lib/virtualscroller/VirtualScroller.vue index 89a3d5e85..6bcaf9918 100644 --- a/components/lib/virtualscroller/VirtualScroller.vue +++ b/components/lib/virtualscroller/VirtualScroller.vue @@ -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(); From dc64b01407b3cacf501321b3e29296f28fd458c0 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Mon, 27 Mar 2023 12:02:07 +0100 Subject: [PATCH 2/2] Remove test:unit check from build:check action --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ed62fe604..134aefaec 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "postinstall": "nuxt prepare", "build:lib": "npm run build:check && npm run build:package", "build:package": "NODE_ENV=production rollup -c && node build-meta && node api-generator/build-api && gulp build-styles", - "build:check": "npm run format:check && npm run security:check && npm run test:unit", + "build:check": "npm run format:check && npm run security:check", "security:check": "npm audit --production --audit-level high", "format": "prettier --write \"**/*.{js,vue,d.ts}\"", "format:check": "prettier --check \"**/*.{js,vue,d.ts}\"",