Skip to content

Commit b5c6d04

Browse files
committed
fix: removed conditional chaining
1 parent fa06e8e commit b5c6d04

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Multiselect.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@
677677
])
678678
},
679679
beforeMount() {
680-
if (this.$root.constructor?.version?.match(/^2\./) || this.vueVersionMs === 2) {
680+
if ((this.$root.constructor && this.$root.constructor.version && this.$root.constructor.version.match(/^2\./)) || this.vueVersionMs === 2) {
681681
if (!this.$options.components.Teleport) {
682682
this.$options.components.Teleport = {
683683
render() {

src/composables/usePointerAction.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ export default function usePointer (props, context, dep)
241241
})
242242

243243
watch(isOpen, (val) => {
244-
if (val && multiselect?.value) {
244+
if (val && multiselect && multiselect.value) {
245245
let firstSelected = multiselect.value.querySelectorAll(`[data-selected]`)[0]
246246

247247
if (!firstSelected) {

0 commit comments

Comments
 (0)