@@ -106,3 +106,3 @@ import {findByNPath} from "../../common.js"; | ||
| // find dataContext for property | ||
| let ctx = this.ctx.find( c => c.hasProp(path.split('.')[0]) ); | ||
| let ctx = this.ctx.find( c => c.hasProp?.(path.split('.')[0]) ); | ||
| ctx?.addEffect(path, cb); | ||
@@ -109,0 +109,0 @@ return ctx; |
@@ -291,5 +291,5 @@ import {fixText, fromDashed, getRandomId, normalizePath, setAttrValue} from '../../common.js' | ||
| // remove current stamped template instance if exist | ||
| if (node._ct) { | ||
| node._ct.detach(); | ||
| node._ct = undefined; | ||
| if (node._ti) { | ||
| node._ti.detach(); | ||
| node._ti = undefined; | ||
| } | ||
@@ -300,4 +300,4 @@ // if value is template stamp to text node parent | ||
| let instance = new TemplateInstance(content); | ||
| instance.attach(null, node, [...ctx, ...(content._hctx)??[]]); | ||
| node._ct = instance; | ||
| node._ti = instance; | ||
| instance.attach(null, node, [node, ...ctx, ...(content._hctx)??[]]); | ||
| ctx[0]._ti.nti.push(instance); | ||
@@ -304,0 +304,0 @@ content = ''; |
+1
-1
| { | ||
| "name": "polylib", | ||
| "description": "A simple library for creating fast, lightweight web components.", | ||
| "version": "1.1.6", | ||
| "version": "1.1.7", | ||
| "license": "MIT", | ||
@@ -6,0 +6,0 @@ "type": "module", |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 2 instances in 1 package
36499
0.02%2
-50%