Skip to content

Commit

Permalink
Merge pull request #39 from contentstack/development
Browse files Browse the repository at this point in the history
Development to staging
  • Loading branch information
cs-raj authored Oct 10, 2024
2 parents c458b3b + f6dc5c3 commit bc69ca2
Showing 1 changed file with 8 additions and 6 deletions.
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

0 comments on commit bc69ca2

Please sign in to comment.