Skip to content

Commit

Permalink
fix(sql): restart error for sql cell
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshinesmilelk authored and october-rain committed Oct 14, 2024
1 parent a7f10fa commit ddc8124
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions packages/libro-sql-cell/src/libro-sql-cell-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,18 @@ export class LibroSqlCellView extends LibroEditableExecutableCellView {
) as LibroSqlCellView[],
);
}
if (this.parent.model.onRestart) {
this.parent.model.onRestart(() => {
this.getDatabaseConfig();
this.parentReady
.then(() => {
if (this.parent.model.onRestart) {
this.parent.model.onRestart(() => {
this.getDatabaseConfig();
});
}
return;
})
.catch(() => {
//
});
}
}

override onViewMount = async () => {
Expand Down

0 comments on commit ddc8124

Please sign in to comment.