@mschop/alpine-web-components 1.0.3 → 1.0.4

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.
@@ -24,7 +24,6 @@ abstract class AlpineWebComponent extends HTMLElement {
24
24
  protected abstract template: string
25
25
  protected styles: () => string = () => ``
26
26
  protected attributeCasts: AttributeCasts = {};
27
- protected updatingAttribute = false;
28
27
  private alpineInitHandler = () => this.init()
29
28
 
30
29
  constructor() {
@@ -62,7 +61,9 @@ abstract class AlpineWebComponent extends HTMLElement {
62
61
  this.state.attributes = {};
63
62
  }
64
63
 
65
- if (oldValue === newValue) {
64
+ const castedNewValue = this.castFromAttribute(name, newValue);
65
+
66
+ if (oldValue === castedNewValue) {
66
67
  return;
67
68
  }
68
69
 
@@ -70,7 +71,7 @@ abstract class AlpineWebComponent extends HTMLElement {
70
71
  return;
71
72
  }
72
73
 
73
- this.state.attributes[name] = this.castFromAttribute(name, newValue);
74
+ this.state.attributes[name] = castedNewValue;
74
75
  }
75
76
 
76
77
  private loadTemplate() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mschop/alpine-web-components",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Use alpinejs with web components and shadow root",
5
5
  "main": "index.js",
6
6
  "scripts": {