TagSpaces is an offline, open source, document manager with tagging support
Show files with this tag broken on lite (#1910)
Stanimirf61678096690
diff --git a/app/components/SearchAutocomplete.tsx b/app/components/SearchAutocomplete.tsxindex 1a05ca84a..94a372c94 100644--- a/app/components/SearchAutocomplete.tsx+++ b/app/components/SearchAutocomplete.tsx@@ -1028,7 +1028,7 @@ function SearchAutocomplete(props: Props) {});} else {}- } else {+ } else if (Pro && Pro.history) {const item: TS.HistoryItem = {path: option.label,url: option.fullName,@@ -1048,19 +1048,21 @@ function SearchAutocomplete(props: Props) {isOpen.current = false;return [];} else if (option.action === ExecActions.OPEN_BOOKMARK) {- const item: TS.HistoryItem = {- path: option.label,- url: option.fullName,- lid: undefined,- creationTimeStamp: 0- };- Pro.history.openItem(- item,- props.currentLocation.uuid,- props.openLink,- props.openLocationById,- props.openFsEntry- );+ if (Pro && Pro.history) {+ const item: TS.HistoryItem = {+ path: option.label,+ url: option.fullName,+ lid: undefined,+ creationTimeStamp: 0+ };+ Pro.history.openItem(+ item,+ props.currentLocation.uuid,+ props.openLink,+ props.openLocationById,+ props.openFsEntry+ );+ }searchOptions.current = SearchOptions;currentOptions.current = undefined;isOpen.current = false;diff --git a/app/reducers/location-index.ts b/app/reducers/location-index.tsindex 8df327926..e2de1b5c2 100644--- a/app/reducers/location-index.ts+++ b/app/reducers/location-index.ts@@ -203,7 +203,7 @@ export const actions = {dispatch(AppActions.exitSearchMode());} else {const searchTitle = defaultTitle(searchQuery);- if (searchTitle.length > 0) {+ if (searchTitle.length > 0 && Pro && Pro.history) {const historyKeys = Pro.history.historyKeys;const currentLocation = getCurrentLocation(getState());if (currentLocation) {