Skip to content

Commit

Permalink
fix: resuming when auto-instantiate is false (marimo-team#1061)
Browse files Browse the repository at this point in the history
when resuming a session and auto-instantiate is false, restore
history of which cells have been executed and which are stale
  • Loading branch information
akshayka authored and Benni-Math committed Apr 16, 2024
1 parent 50d4194 commit 6377c10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/core/websocket/useMarimoWebSocket.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function useMarimoWebSocket(opts: {
// A cell is stale if we did not auto-instantiate (i.e. nothing has run yet)
// or if the code has changed since the last time it was run.
let edited = false;
if (autoInstantiate) {
if (autoInstantiate || resumed) {
const lastCodeRun = last_executed_code[cellId];
if (lastCodeRun) {
edited = lastCodeRun !== code;
Expand Down

0 comments on commit 6377c10

Please sign in to comment.