Skip to content

Commit

Permalink
fix: 兼容旧的物料协议
Browse files Browse the repository at this point in the history
  • Loading branch information
yy-wow committed Jan 15, 2025
1 parent e2a5eb4 commit 0df006e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/plugins/materials/src/composable/useMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,11 @@ const parseMaterialsDependencies = (materialBundle) => {
scripts.forEach((item) => {
const dep = scriptsDeps.find((dep) => dep.package === item.package)

if (dep && item.components) {
if (dep) {
// 合并组件
dep.components = { ...dep.components, ...item.components }
dep.components = { ...dep.components, ...(item.components || {}) }
} else {
scriptsDeps.push(item)
}
})

Expand Down

0 comments on commit 0df006e

Please sign in to comment.