From 46599a1ec0a166e277136b0520ac75d21f23c735 Mon Sep 17 00:00:00 2001 From: bach Date: Wed, 29 May 2024 19:59:21 +0200 Subject: [PATCH] linkEditable bug fix --- src/components/editable/LinkEditable.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/editable/LinkEditable.vue b/src/components/editable/LinkEditable.vue index 010ae2f..1eaabae 100644 --- a/src/components/editable/LinkEditable.vue +++ b/src/components/editable/LinkEditable.vue @@ -44,8 +44,10 @@ export default { }, updated() { console.log('LinkEditable updated', this.links, this.$refs.links_list); - this.$refs.links_list.lastChild.querySelector('input.new.title').value = null; - this.$refs.links_list.lastChild.querySelector('input.new.url').value = null; + if (this.$refs.links_list.lastElementChild) { + this.$refs.links_list.lastElementChild.querySelector('input.new.title').value = null; + this.$refs.links_list.lastElementChild.querySelector('input.new.url').value = null; + } }, mounted () {