@lvce-editor/source-control-worker 2.2.0 → 2.3.0

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.
@@ -1716,6 +1716,17 @@ const Directory = 3;
1716
1716
  const DirectoryExpanded = 4;
1717
1717
  const File = 7;
1718
1718
 
1719
+ const getActualDecorationIcon = (iconDefinitions, icon) => {
1720
+ if (typeof icon === 'number') {
1721
+ const value = iconDefinitions[icon];
1722
+ if (!value) {
1723
+ return 'not-available';
1724
+ }
1725
+ return value;
1726
+ }
1727
+ return icon;
1728
+ };
1729
+
1719
1730
  const getFileIcon = ({
1720
1731
  name
1721
1732
  }) => {
@@ -1727,12 +1738,6 @@ const pathBaseName = path => {
1727
1738
  return path.slice(path.lastIndexOf('/') + 1);
1728
1739
  };
1729
1740
 
1730
- const getActualDecorationIcon = (iconDefinitions, icon) => {
1731
- if (typeof icon === 'number') {
1732
- return iconDefinitions[icon];
1733
- }
1734
- return icon;
1735
- };
1736
1741
  const getDisplayItemsGroup = (group, expandedGroups, iconDefinitions) => {
1737
1742
  const displayItems = [];
1738
1743
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/source-control-worker",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Source Control Worker",
5
5
  "keywords": [
6
6
  "Lvce Editor"