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') }