Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit bb3696b

Browse files
committed
more consistent timeouts
1 parent 50c0a7d commit bb3696b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/services/EditEngineService.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,16 @@ class EditEngine {
8181
*/
8282
public async updateRowFileProxy(file: TFile, columnId: string, newValue: Literal, columns: TableColumn[], ddbbConfig: LocalSettings, option: string): Promise<void> {
8383
this.onFlyEditions.push({ file, columnId, newValue, columns, ddbbConfig, option });
84-
if (this.currentTimeout) {
85-
clearTimeout(this.currentTimeout);
86-
}
84+
clearTimeout(this.currentTimeout);
8785
this.currentTimeout = setTimeout(async () => {
8886
// Call all onFlyEditions
8987
while (this.onFlyEditions.length > 0) {
9088
const { file, columnId, newValue, columns, ddbbConfig, option } = this.onFlyEditions.pop();
91-
await this.updateRowFile(file, columnId, newValue, columns, ddbbConfig, option).catch((err) => {
92-
showDBError(EditionError.YamlRead, err);
93-
});
89+
await this.updateRowFile(file, columnId, newValue, columns, ddbbConfig, option)
90+
.catch((err) => {
91+
showDBError(EditionError.YamlRead, err);
92+
});
93+
this.currentTimeout = null;
9494
}
9595
}, 250);
9696
}

0 commit comments

Comments
 (0)