Skip to content

Commit 0b14bbe

Browse files
committed
timetravel: little issue
1 parent 74c6a86 commit 0b14bbe

File tree

1 file changed

+14
-8
lines changed
  • src/packages/frontend/frame-editors/time-travel-editor

1 file changed

+14
-8
lines changed

src/packages/frontend/frame-editors/time-travel-editor/actions.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -292,19 +292,25 @@ export class TimeTravelActions extends CodeEditorActions<TimeTravelState> {
292292
}
293293

294294
public setTextMode(id: string, text_mode: boolean): void {
295-
const node = this._get_frame_node(id);
296-
if (node == null) {
297-
return;
295+
for (const actions of [this, this.ambient_actions]) {
296+
if (actions == null) continue;
297+
const node = actions._get_frame_node(id);
298+
if (node == null) continue;
299+
text_mode = !!text_mode;
300+
actions.set_frame_tree({ id, text_mode });
301+
break;
298302
}
299-
this.set_frame_tree({ id, text_mode: !!text_mode });
300303
}
301304

302305
public setGitMode(id: string, git_mode: boolean): void {
303-
const node = this._get_frame_node(id);
304-
if (node == null) {
305-
return;
306+
for (const actions of [this, this.ambient_actions]) {
307+
if (actions == null) continue;
308+
const node = actions._get_frame_node(id);
309+
if (node == null) continue;
310+
git_mode = !!git_mode;
311+
actions.set_frame_tree({ id, git_mode });
312+
break;
306313
}
307-
this.set_frame_tree({ id, git_mode: !!git_mode });
308314
this.updateGitVersions();
309315
}
310316

0 commit comments

Comments
 (0)