Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
msujew committed May 7, 2024
1 parent 6369f6f commit 711fb31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/notebook/src/browser/view-model/notebook-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export class NotebookModel implements Saveable, Disposable {
throw new Error('could not read notebook snapshot');
}
const data = JSON.parse(rawData) as NotebookData;
this.reset(data);
this.setData(data);
}

async revert(options?: Saveable.RevertOptions): Promise<void> {
Expand All @@ -212,7 +212,7 @@ export class NotebookModel implements Saveable, Disposable {
}
}

reset(data: NotebookData): void {
setData(data: NotebookData): void {
// Replace all cells in the model
this.replaceCells(0, this.cells.length, data.cells, false);
this.metadata = data.metadata;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export class NotebookDocumentsMainImpl implements NotebookDocumentsMain {
// apply content changes... slightly HACKY -> this triggers a change event
if (options.content) {
const data = NotebookDto.fromNotebookDataDto(options.content);
ref.reset(data);
ref.setData(data);
}
return ref.uri.toComponents();
}
Expand Down

0 comments on commit 711fb31

Please sign in to comment.