Skip to content

Commit

Permalink
Fix vscode plugin breaking if previously installed
Browse files Browse the repository at this point in the history
  • Loading branch information
l0drex committed Apr 14, 2024
1 parent 0a1bf38 commit fd1285e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions yin_yang/plugins/vscode.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ def update_config(self, config: dict, theme: str):
@property
def available_themes(self) -> dict:
themes_dict = {}
if not self.available:
return themes_dict

for path in filter(isdir, extension_paths):
with os.scandir(path) as entries:
Expand All @@ -100,9 +98,12 @@ def available_themes(self) -> dict:
for theme_name in get_theme_name(f'{d.path}/package.json'):
themes_dict[theme_name] = theme_name

assert themes_dict != {}, 'No themes found'
return themes_dict

@property
def available(self) -> bool:
return self.available_themes != {}

def __str__(self):
# for backwards compatibility
return 'code'
Expand Down

0 comments on commit fd1285e

Please sign in to comment.