Skip to content

Commit

Permalink
fix onload and onerror parsing error (#3707)
Browse files Browse the repository at this point in the history
regression error induced by 299b123 where serde default got removed from `load_error` attribute of `ImageData`.

```diff
pub struct ImageData {
-     #[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
-     pub load_error: bool,
+     inner: Box<dyn HasImageData>,
}

// ...

+ struct SerializedImageData {
+     load_error: bool,
+ }
```
  • Loading branch information
sehnryr authored Feb 8, 2025
1 parent 1c902ab commit ab91965
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/html/src/events/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ impl ImageData {
/// A serialized version of ImageData
#[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq, Clone)]
pub struct SerializedImageData {
#[cfg_attr(feature = "serialize", serde(default))]
load_error: bool,
}

Expand Down

0 comments on commit ab91965

Please sign in to comment.