Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
import mask from 'json-mask'
import {
merge,
mergeWith,
reverse,
sortBy,
mergeWith,
isArray
} from 'lodash'
import sift from 'sift'
import {
Expand Down Expand Up @@ -1436,11 +1437,12 @@ export class Stack {

schemas.forEach((schema) => {
// Entry references
entryReferences = mergeWith(entryReferences, schema[this.types.references])
// tslint:disable-next-line: forin
for (const path in schema[this.types.assets]) {
paths.push(path)
}
entryReferences = mergeWith(entryReferences, schema[this.types.references], (existingReferences, newReferences) => {
if (isArray(existingReferences)) {
return Array.from(new Set(existingReferences.concat(newReferences)));
}
return existingReferences;
});
})

for (let i = 0, j = currentInclude.length; i < j; i++) {
Expand Down