mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-19 06:01:05 +08:00
Fix: Error message: Use 'const' instead. (#13982)
### What problem does this PR solve? Fix: Linter error message: Use 'const' instead. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Updated variable declarations across form components, agent utilities, memory management hooks, and data handling functions to enhance code consistency and maintainability throughout the application codebase. * **Style** * Added ESLint suppressions to document intentional constant-condition patterns in asynchronous event streaming operations. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -54,10 +54,10 @@ export const transformBase64ToFile = (
|
||||
dataUrl: string,
|
||||
filename: string = 'file',
|
||||
) => {
|
||||
let arr = dataUrl.split(','),
|
||||
bstr = atob(arr[1]),
|
||||
n = bstr.length,
|
||||
u8arr = new Uint8Array(n);
|
||||
const arr = dataUrl.split(','),
|
||||
bstr = atob(arr[1]);
|
||||
let n = bstr.length;
|
||||
const u8arr = new Uint8Array(n);
|
||||
|
||||
const mime = arr[0].match(/:(.*?);/);
|
||||
const mimeType = mime ? mime[1] : 'image/png';
|
||||
|
||||
@@ -17,7 +17,7 @@ const registerServer = <T extends string>(
|
||||
request: RequestMethod,
|
||||
) => {
|
||||
const server: Service<T> = {} as Service<T>;
|
||||
for (let key in opt) {
|
||||
for (const key in opt) {
|
||||
server[key] = (params?: any, urlAppendix?: string) => {
|
||||
let url = opt[key].url;
|
||||
const requestOptions = opt[key];
|
||||
|
||||
Reference in New Issue
Block a user