@mixd-id/web-scaffold 0.1.230406142 → 0.1.230406143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/utils/helpers.mjs +9 -6
package/package.json
CHANGED
package/src/utils/helpers.mjs
CHANGED
|
@@ -267,14 +267,17 @@ function observeInit(){
|
|
|
267
267
|
|
|
268
268
|
const item = entry.target
|
|
269
269
|
const key = item.__observeKey
|
|
270
|
-
const { type, callback } = observeCols[key]
|
|
271
270
|
|
|
272
|
-
if(
|
|
273
|
-
callback
|
|
271
|
+
if(observeCols[key]){
|
|
272
|
+
const { type, callback } = observeCols[key]
|
|
274
273
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
274
|
+
if(typeof callback === 'function')
|
|
275
|
+
callback.apply(item)
|
|
276
|
+
|
|
277
|
+
if(type === 'once'){
|
|
278
|
+
observer.unobserve(item)
|
|
279
|
+
delete observeCols[key]
|
|
280
|
+
}
|
|
278
281
|
}
|
|
279
282
|
})
|
|
280
283
|
}
|