瀏覽代碼

chore: applied PR suggestions

Co-authored-by: Tino Koch <17991193+Tinoooo@users.noreply.github.com>
Alvaro Saburido 2 年之前
父節點
當前提交
583dfa8f75
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/core/nodeOps.ts

+ 2 - 2
src/core/nodeOps.ts

@@ -26,7 +26,7 @@ export const nodeOps: RendererOptions<TresObject, TresObject> = {
   createElement(tag, _isSVG, _anchor, props) {
     if (!props) props = {}
 
-    if (props.args === undefined) {
+    if (!props.args) {
       props.args = []
     }
     if (tag === 'template') return null
@@ -42,7 +42,7 @@ export const nodeOps: RendererOptions<TresObject, TresObject> = {
     } else {
       const target = catalogue.value[name]
       if (!target) {
-        logError(`${name} is not defined on the THREE namespace. Use extend to add it the catalog`)
+        logError(`${name} is not defined on the THREE namespace. Use extend to add it to the catalog.`)
       }
       instance = Object.assign(new target(...props.args), { type: name, attach: props.attach, primitive: true })
     }