@industry-theme/file-city-panel 0.2.55 → 0.2.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"GitChangesTree.d.ts","sourceRoot":"","sources":["../../../src/panels/components/GitChangesTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAGpD,OAAO,EAAwB,KAAK,QAAQ,EAAE,KAAK,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAEpH,iDAAiD;AACjD,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC,kDAAkD;AAClD,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAEvF,UAAU,mBAAmB;IAC3B,kDAAkD;IAClD,SAAS,EAAE,kBAAkB,CAAC;IAC9B,mDAAmD;IACnD,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC3B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sCAAsC;IACtC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC5E,sCAAsC;IACtC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CACpE;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgKxD,CAAC"}
1
+ {"version":3,"file":"GitChangesTree.d.ts","sourceRoot":"","sources":["../../../src/panels/components/GitChangesTree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAGpD,OAAO,EAAwB,KAAK,QAAQ,EAAE,KAAK,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAEpH,iDAAiD;AACjD,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC,kDAAkD;AAClD,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAEvF,UAAU,mBAAmB;IAC3B,kDAAkD;IAClD,SAAS,EAAE,kBAAkB,CAAC;IAC9B,mDAAmD;IACnD,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC3B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sCAAsC;IACtC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC5E,sCAAsC;IACtC,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CACpE;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA6KxD,CAAC"}
@@ -2578,9 +2578,16 @@ const GitChangesTree = ({
2578
2578
  ...gitStatus.modifiedFiles,
2579
2579
  ...expandedUntracked,
2580
2580
  ...gitStatus.deletedFiles
2581
- ].sort((a, b) => a.localeCompare(b));
2581
+ ].filter((path) => path && path.trim().length > 0).sort((a, b) => a.localeCompare(b));
2582
+ if (allChangedFiles.length === 0) {
2583
+ return null;
2584
+ }
2582
2585
  const builder = new N();
2583
2586
  const tree = builder.build({ files: allChangedFiles, rootPath: rootPath ?? "" });
2587
+ if (!tree || !tree.root || !tree.root.children || tree.root.children.length === 0) {
2588
+ console.warn("GitChangesTree: FileTree has no children", { tree, allChangedFiles });
2589
+ return null;
2590
+ }
2584
2591
  return { tree, statusData };
2585
2592
  }, [hasChanges, fileTree, gitStatus, rootPath]);
2586
2593
  if (!hasChanges) {