Skip to content

Commit da3d42c

Browse files
committed
Refactor code to keep existing code paths as is
1 parent 88e461e commit da3d42c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/bundle.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -738,10 +738,7 @@ function generateComponentsObject(documentContext, rootContent,
738738
else if (!refData) {
739739
return;
740740
}
741-
else if (isExtRef(property, '$ref') && !isExtURLRef(property, '$ref')) {
742-
refData.nodeContent = documentContext.nodeContents[nodeRef];
743-
}
744-
else {
741+
else if (!isExtRef(property, '$ref') && isExtURLRef(property, '$ref')) {
745742
let splitPathByHttp = property.$ref.split(httpSeparator),
746743
prefix = splitPathByHttp
747744
.slice(0, splitPathByHttp.length - 1).join(httpSeparator) +
@@ -764,6 +761,9 @@ function generateComponentsObject(documentContext, rootContent,
764761
});
765762
}
766763
}
764+
else {
765+
refData.nodeContent = documentContext.nodeContents[nodeRef];
766+
}
767767
if (local) {
768768
let contentFromTrace = getContentFromTrace(refData.nodeContent, local);
769769
if (!contentFromTrace) {

0 commit comments

Comments
 (0)