Skip to content

Commit

Permalink
bug(scan): always add children as property of componentProfile
Browse files Browse the repository at this point in the history
  • Loading branch information
kittisakLS committed Nov 13, 2023
1 parent 6744566 commit 0627ff6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vue-scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,7 @@ export class VueScanner implements Scanner {
) {
this.componentProfiles.forEach((ele) => {
const { name, source: componentSource } = ele;
ele.children = { total: 0, tags: [], source: "" };
const transformedTag = kebabCaseToPascalCase(name);
// Find imported tags that match the transformed or original component tag name
const foundImportedTags = importStatements.filter((im) =>
Expand Down Expand Up @@ -698,7 +699,6 @@ export class VueScanner implements Scanner {
updatedBy: "",
...componentSource.property,
} as FileProperty;
ele.children = { total: 0, tags: [], source: "" };
if (importSourceType === "internal") {
children.forEach((child) => {
if ([sourcePath, source].includes(child.source)) {
Expand Down

0 comments on commit 0627ff6

Please sign in to comment.