Преглед на файлове

fix(useLoader): remove array related logic for loaders (#808)

Alvaro Saburido преди 11 месеца
родител
ревизия
88cef1e0ab
променени са 2 файла, в които са добавени 2 реда и са изтрити 4 реда
  1. 1 1
      playground/vue/tsconfig.json
  2. 1 3
      src/composables/useLoader/index.ts

+ 1 - 1
playground/vue/tsconfig.json

@@ -7,7 +7,7 @@
     "module": "ESNext",
     "moduleResolution": "bundler",
     "paths": {
-      "@tresjs/core": ["dist"]
+      "@tresjs/core": ["../../dist"]
     },
     "resolveJsonModule": true,
     "strict": true,

+ 1 - 3
src/composables/useLoader/index.ts

@@ -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) {