Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix to logic
  • Loading branch information
nlundquist committed Jun 11, 2020
commit 51cd9a9f90a03fbea012fb962f276279ba3ad30e
2 changes: 1 addition & 1 deletion lib/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ function addShallowReferences(parser, inventory) {

// if this is not already a shallow reference (depth 2 or less),
// when we reference a new file, or a new hash (that is not a subhash of the previous) add a new reference
if (entry.depth > 2 && (entry.file !== prev.file || (entry.file === prev.file && entry.hash.indexOf(prev.hash) !== 0))) {
if (entry.depth > 2 && (entry.file !== prev.file || (entry.file === prev.file && entry.hash !== prev.hash && entry.hash.indexOf(prev.hash + '/') !== 0))) {
const path = entry.hash.substring(2)
const pathParts = path.split('/')
const refClone = { $ref: entry.$ref.$ref }
Expand Down