Fix type errors after rebase

- Add back api import to Load3dUtils (needed by fileExists and uploadThumbnail)
- Add null check for result.response in uploadTempImage
- Ensures type safety after rebase on main
This commit is contained in:
bymyself
2026-01-20 21:25:22 -08:00
parent a6987bc379
commit 5fc3cb6e0d

View File

@@ -2,6 +2,7 @@ import type Load3d from '@/extensions/core/load3d/Load3d'
import { t } from '@/i18n'
import { uploadMedia } from '@/platform/assets/services/uploadService'
import { useToastStore } from '@/platform/updates/common/toastStore'
import { api } from '@/scripts/api'
import { app } from '@/scripts/app'
class Load3dUtils {
@@ -40,7 +41,7 @@ class Load3dUtils {
{ subfolder: 'threed', type: 'temp' }
)
if (!result.success) {
if (!result.success || !result.response) {
const err = `Error uploading temp file: ${result.error}`
useToastStore().addAlert(err)
throw new Error(err)