Skip to content

Commit

Permalink
fix azle init post upgrade globals
Browse files Browse the repository at this point in the history
  • Loading branch information
lastmjs committed Oct 29, 2024
1 parent 1c82f1e commit 4bc78b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file modified canister_templates/experimental.wasm
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ pub fn initialize_js(

runtime.run_with_context(|context| {
let assignment = if init {
"globalThis._azleInitCalled = true;"
"globalThis._azleInitCalled = true;\nglobalThis._azlePostUpgradeCalled = false;"
} else {
"globalThis._azlePostUpgradeCalled = true;"
"globalThis._azleInitCalled = false;\nglobalThis._azlePostUpgradeCalled = true;"
};

context.eval_global_str(assignment.to_string());
Expand Down

0 comments on commit 4bc78b7

Please sign in to comment.