lint code

This commit is contained in:
lyswhut
2023-08-30 14:30:47 +08:00
parent 358142c1cc
commit 2fff8652ca
48 changed files with 123 additions and 106 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ export const setApi = async(id: string) => {
}
const apiList = getUserApis()
if (!apiList.some(a => a.id === id)) return
userApiId = id
userApiId ||= id
await loadApi(id)
}
+1
View File
@@ -30,6 +30,7 @@ export const createWindow = async(userApi: LX.UserApi.UserApiInfo) => {
dir ??= process.env.NODE_ENV !== 'production' ? webpackUserApiPath : path.join(encodePath(__dirname), 'userApi')
if (!html) {
// eslint-disable-next-line require-atomic-updates
html = await fs.promises.readFile(path.join(dir, 'renderer/user-api.html'), 'utf8')
}
const preloadUrl = process.env.NODE_ENV !== 'production'