diff --git a/canister_templates/experimental.wasm b/canister_templates/experimental.wasm index 53522f07aa..3ce5ca35bd 100644 Binary files a/canister_templates/experimental.wasm and b/canister_templates/experimental.wasm differ diff --git a/src/build/experimental/commands/compile/wasm_binary/rust/experimental_canister_template/src/init_and_post_upgrade.rs b/src/build/experimental/commands/compile/wasm_binary/rust/experimental_canister_template/src/init_and_post_upgrade.rs index 43cf8f97b3..1e6658f46c 100644 --- a/src/build/experimental/commands/compile/wasm_binary/rust/experimental_canister_template/src/init_and_post_upgrade.rs +++ b/src/build/experimental/commands/compile/wasm_binary/rust/experimental_canister_template/src/init_and_post_upgrade.rs @@ -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());