Skip to content

Commit

Permalink
fix(useLoader): remove array related logic for loaders (#808)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu authored Aug 30, 2024
1 parent be1f484 commit 88cef1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion playground/vue/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"module": "ESNext",
"moduleResolution": "bundler",
"paths": {
"@tresjs/core": ["dist"]
"@tresjs/core": ["../../dist"]
},
"resolveJsonModule": true,
"strict": true,
Expand Down
4 changes: 1 addition & 3 deletions src/composables/useLoader/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,9 @@ export async function useLoader<T>(
extensions(proto)
}

const paths = (Array.isArray(url) ? url : [url]) as string[]

return await new Promise((resolve, reject) => {
proto.load(
paths,
url,
(result: T) => {
const data = result as unknown as TresObject
if (data.scene) {
Expand Down

0 comments on commit 88cef1e

Please sign in to comment.