Skip to content

Commit

Permalink
fixed issue with wasm code
Browse files Browse the repository at this point in the history
  • Loading branch information
RealRTTV committed Jun 16, 2024
1 parent 3991c55 commit 690d436
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub fn write() -> bool {

#[cfg(target_arch = "wasm32")]
pub fn write() -> bool {
let Some(local_storage) = web_sys::window().and_then(|window| window.local_storage().ok()).flatten();
let Some(local_storage) = web_sys::window().and_then(|window| window.local_storage().ok()).flatten() else { return false };
let value = write0();
local_storage.set_item("config", &value).is_ok()
}
Expand Down
2 changes: 1 addition & 1 deletion src/elements/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ impl NbtRegion {
{
let timestamp = u32::from_be_bytes(timestamp);
let offset = u32::from_be_bytes(offset);
threads.push((timestamp, parse(offset, bytes, sort)));
threads.push((timestamp, parse(offset, bytes)));
}


Expand Down

0 comments on commit 690d436

Please sign in to comment.