mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Fix error when canceling import
Summary: If cancel was clicked while a transform section was still being generated in the Importer, an error was thrown. This refactors the cancelImportFiles API action to take in the file upload id in place of the entire DataSourceTransformed parameter, which contains other values that are irrelevant to canceling. One of those values, the transform section id, was causing the error to be thrown since it was momentarily null. Test Plan: Tested manually. Reviewers: alexmojaki Reviewed By: alexmojaki Differential Revision: https://phab.getgrist.com/D3317
This commit is contained in:
@@ -446,10 +446,8 @@ export class Importer extends DisposableWithEvents {
|
||||
this._resetImportDiffState();
|
||||
// Formula editor cleanup needs to happen before the hidden tables are removed.
|
||||
this._formulaEditorHolder.dispose();
|
||||
|
||||
if (this._uploadResult) {
|
||||
await this._docComm.cancelImportFiles(
|
||||
this._getTransformedDataSource(this._uploadResult), this._getHiddenTableIds());
|
||||
await this._docComm.cancelImportFiles(this._uploadResult.uploadId, this._getHiddenTableIds());
|
||||
}
|
||||
this._screen.close();
|
||||
this.dispose();
|
||||
|
||||
Reference in New Issue
Block a user