fix(lua): dont serialize hash when None

because it becomes an `userdata: NULL` and not `nil`, what??
This commit is contained in:
əlemi 2024-11-17 18:58:22 +01:00
parent ec6e131122
commit 0c8c4a61ea
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -13,6 +13,7 @@
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
pub struct BufferUpdate {
/// Optional content hash after applying this change.
#[cfg_attr(feature = "serialize", serde(skip_serializing_if = "Option::is_none"))]
pub hash: Option<i64>,
/// CRDT version after this change has been applied.
pub version: Vec<i64>,