mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-05 05:39:11 +00:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user