From f397c57c37e5796d11452ac30063aedc84da9864 Mon Sep 17 00:00:00 2001 From: yutent Date: Wed, 22 Mar 2023 18:56:14 +0800 Subject: [PATCH] fixed --- package.json | 2 +- src/html.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 16d44ec..5fdbe05 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bd/core", - "version": "1.5.10", + "version": "1.5.11", "type": "module", "description": "百搭UI组件库的核心", "main": "dist/index.js", diff --git a/src/html.js b/src/html.js index e8e0a6f..cba94db 100644 --- a/src/html.js +++ b/src/html.js @@ -289,7 +289,7 @@ class TemplateInstance { #checkRef(node, walker, options) { do { - if (node.nodeType === 1 && node.getAttribute('ref')) { + if (node?.nodeType === 1 && node?.getAttribute('ref')) { options.host.$refs[node.getAttribute('ref')] = node node.removeAttribute('ref') }