Skip to content

Commit

Permalink
Add getResults for VaultSourceEntrySearch
Browse files Browse the repository at this point in the history
  • Loading branch information
perry-mitchell committed Feb 6, 2024
1 parent 62e449e commit 01bbdf5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion source/search/VaultSourceEntrySearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,18 @@ export class VaultSourceEntrySearch extends VaultEntrySearch {

/**
* Last search results
* @deprecated Use `getResults` instead
*/
get results(): Array<SearchResult> {
return this._results.map((res) => {
return this.getResults();
}

/**
* Get last search results
* @returns An array of results
*/
getResults(): Array<SearchResult> {
return super.getResults().map((res) => {
const output = res;
const source = this._sources.find((src) => src?.vault?.id === output.vaultID);
if (source) {
Expand Down

0 comments on commit 01bbdf5

Please sign in to comment.