diff --git a/.changeset/tiny-coats-sniff.md b/.changeset/tiny-coats-sniff.md new file mode 100644 index 0000000000..41d90fee70 --- /dev/null +++ b/.changeset/tiny-coats-sniff.md @@ -0,0 +1,5 @@ +--- +"@zag-js/avatar": patch +--- + +Improve image load check to use `naturalWidth|Height` instead of `currentSrc` diff --git a/.xstate/avatar.js b/.xstate/avatar.js index 8206eedfe6..520e66fe83 100644 --- a/.xstate/avatar.js +++ b/.xstate/avatar.js @@ -30,7 +30,7 @@ const fetchMachine = createMachine({ states: { loading: { activities: ["trackSrcChange"], - entry: ["checkImgStatus"], + entry: ["checkImageStatus"], on: { "IMG.LOADED": { target: "loaded", diff --git a/examples/vanilla-ts/index.html b/examples/vanilla-ts/index.html index c629ba4b05..59ebe90aad 100644 --- a/examples/vanilla-ts/index.html +++ b/examples/vanilla-ts/index.html @@ -7,25 +7,9 @@