@mschop/alpine-web-components 1.0.5 → 1.0.7

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.
@@ -61,17 +61,16 @@ abstract class AlpineWebComponent extends HTMLElement {
61
61
  this.state.attributes = {};
62
62
  }
63
63
 
64
- const castedNewValue = this.castFromAttribute(name, newValue);
65
-
66
- if (oldValue === castedNewValue) {
64
+ if (oldValue === newValue) {
67
65
  return;
68
66
  }
69
67
 
70
- if (this.state.attributes[name] === newValue) {
71
- return;
68
+ const castedNewValue = this.castFromAttribute(name, newValue);
69
+
70
+ if (this.state.attributes[name] !== castedNewValue) {
71
+ this.state.attributes[name] = castedNewValue;
72
72
  }
73
73
 
74
- this.state.attributes[name] = castedNewValue;
75
74
  }
76
75
 
77
76
  protected loadTemplate() {
@@ -108,7 +107,7 @@ abstract class AlpineWebComponent extends HTMLElement {
108
107
  if (value === null && this.state.attributes[key] !== undefined) {
109
108
  const attribute = this.castToAttribute(
110
109
  key,
111
- this.castToAttribute(key, this.state.attributes[key])
110
+ this.state.attributes[key],
112
111
  );
113
112
  if (attribute !== null) {
114
113
  this.setAttribute(key, attribute)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mschop/alpine-web-components",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Use alpinejs with web components and shadow root",
5
5
  "main": "index.js",
6
6
  "scripts": {