Skip to content

Commit ac16af6

Browse files
committed
fix id check for already-extended components
1 parent 71329c3 commit ac16af6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/util/options.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,13 @@ function guardArrayAssets (assets) {
279279
var asset
280280
while (i--) {
281281
asset = assets[i]
282-
if (!asset.id) {
282+
var id = asset.id || (asset.options && asset.options.id)
283+
if (!id) {
283284
process.env.NODE_ENV !== 'production' && _.warn(
284285
'Array-syntax assets must provide an id field.'
285286
)
286287
} else {
287-
res[asset.id] = asset
288+
res[id] = asset
288289
}
289290
}
290291
return res

0 commit comments

Comments
 (0)