Fix file browser to not add empty line when no file/dir selected

- When no file selected in file browser an empty line/entry gets added
  to input entries list
- Bug got introduced due to insufficient update on change to add
  instead of insert
- Update is_none_or_empty helper method to also check for empty string
This commit is contained in:
Debanjum Singh Solanky
2022-08-21 02:03:28 +03:00
parent 8098b8c3a8
commit 5e6625ac68
2 changed files with 7 additions and 11 deletions

View File

@@ -5,7 +5,7 @@ from os.path import join
def is_none_or_empty(item):
return item == None or (hasattr(item, '__iter__') and len(item) == 0)
return item == None or (hasattr(item, '__iter__') and len(item) == 0) or item == ''
def to_snake_case_from_dash(item: str):