pawajs 2.3.3 → 2.3.5

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.
@@ -3,6 +3,7 @@ import {PawaElement,PawaComment} from '../pawaElement.js';
3
3
  import {keepContext,render, HmrComponentMap } from '../index.js'
4
4
  import {createEffect} from '../reactive.js'
5
5
  function isPawaState(obj) {
6
+ if(typeof obj !== 'object')return false
6
7
  return (
7
8
  obj !== null &&
8
9
  typeof obj === 'object' &&
@@ -66,17 +67,12 @@ function restorePawaStateFromContext(oldCtx, newCtx,stateContext,oldStateContext
66
67
  for (const key of Object.keys(newCtx)) {
67
68
  const oldVal = oldCtx[key]
68
69
  const newVal = newCtx[key]
69
- if (!isPawaState(oldVal) || !isPawaState(newVal)) continue
70
70
 
71
71
  const initializerChanged =
72
72
  prevInitials !== undefined &&
73
73
  Object.prototype.hasOwnProperty.call(prevInitials, key) &&
74
74
  !sameInitial(prevInitials[key], freshInitials[key])
75
75
 
76
- if (initializerChanged) {
77
- continue
78
- }
79
-
80
76
  if (typeof newVal.value === typeof oldVal.value ) {
81
77
  newVal.value = oldVal.value
82
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pawajs",
3
- "version": "2.3.3",
3
+ "version": "2.3.5",
4
4
  "type":"module",
5
5
  "description": "pawajs library (reactive web runtime) for easily building web ui, enhancing html element, micro frontend, spa etc ",
6
6
  "main": "index.js",