From cc20b57c4acb7808a2eb92dffe87c909b2054464 Mon Sep 17 00:00:00 2001 From: Massi-X Date: Mon, 9 Dec 2024 22:57:31 +0100 Subject: [PATCH] Fix selectOption failure In some rare cases selectOption will fail because parentNode is null. Bypassing that part of code is enough to fix it --- src/tagify.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tagify.js b/src/tagify.js index cce4ea05..beee3790 100644 --- a/src/tagify.js +++ b/src/tagify.js @@ -634,6 +634,9 @@ Tagify.prototype = { } if( tagElm && veryfyTagTextProp() ){ + if(!tagElm.parentNode) + return; + tagElm = this.replaceTag(tagElm, tagData) this.editTagToggleValidity(tagElm, tagData)