Skip to content

Commit cecb606

Browse files
authored
feat: material config support object (#1313)
1 parent b81baf5 commit cecb606

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/plugins/materials/src/composable/useMaterial.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,9 @@ const setMaterial = (name, data) => {
420420
*/
421421
export const getMaterialsRes = async () => {
422422
const bundleUrls = getMergeMeta('engine.config')?.material || []
423-
const materials = await Promise.allSettled(bundleUrls.map((url) => getMetaApi(META_SERVICE.Http).get(url)))
423+
const materials = await Promise.allSettled(
424+
bundleUrls.map((url) => (typeof url === 'string' ? getMetaApi(META_SERVICE.Http).get(url) : url))
425+
)
424426
return materials
425427
}
426428

0 commit comments

Comments
 (0)