diff --git a/ui/time_entries_items_tree.gd b/ui/time_entries_items_tree.gd index 1a06266..5f41075 100644 --- a/ui/time_entries_items_tree.gd +++ b/ui/time_entries_items_tree.gd @@ -36,8 +36,11 @@ func get_current_text() -> String: var item := get_selected() if not item: return "" - var resp: String = item.get_metadata(COL.TEXT) - return resp + + var resp = item.get_metadata(COL.TEXT) + if resp is String: + return resp + return "" ## Adds a new item to the tree, or returns the old item if it exists