diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/useTools.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditor/useTools.tsx index 2221ab5497..ec495819e6 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/useTools.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/useTools.tsx @@ -22,7 +22,7 @@ interface State { tryReadScript: (file: File, prevScript: string) => Promise; readScript: (file: File) => Promise; downloadScript: (script: string) => void; - isFileValid: (file: File) => boolean; + checkFileValidity: (file: File) => boolean; } export function useTools(connectionId: string | undefined): Readonly { @@ -33,7 +33,7 @@ export function useTools(connectionId: string | undefined): Readonly { return useObservableRef(() => ({ async tryReadScript(file: File, prevScript: string) { - const valid = this.isFileValid(file); + const valid = this.checkFileValidity(file); if (!valid) { return null; @@ -66,7 +66,7 @@ export function useTools(connectionId: string | undefined): Readonly { return script; }, - isFileValid(file: File) { + checkFileValidity(file: File) { const maxSize = this.sqlEditorSettingsService.settings.getValue('maxFileSize'); const size = Math.round(file.size / 1000); // kilobyte const aboveMaxSize = size > maxSize; @@ -106,7 +106,7 @@ export function useTools(connectionId: string | undefined): Readonly { { tryReadScript: action.bound, readScript: action.bound, - isFileValid: action.bound, + checkFileValidity: action.bound, downloadScript: action.bound, }, {