Skip to content

Commit

Permalink
Merge pull request #60 from pnp/search-results-fix
Browse files Browse the repository at this point in the history
fixed all properties iteration
  • Loading branch information
tavikukko authored Feb 5, 2024
2 parents ec5c92d + cbe39a3 commit 6375d8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/search/chrome/allprops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const allprops = (content: any, SourceId: any, extPath: string) => {
return sp
.search(opts)
.then((r1: any) => {
const entries = r1.RawSearchResults.PrimaryQueryResult.RefinementResults.Refiners[0].Entries;
const entries = r1.RawSearchResults.PrimaryQueryResult.RefinementResults.Refiners.results[0].Entries.results;
const allProps = entries.map((entry) => entry.RefinementName);

const filteredProps = allProps.filter(
Expand Down
2 changes: 1 addition & 1 deletion src/pages/search/chrome/currentpageallprops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const currentpageallprops = (extPath: string) => {
};
return sp.search(opts).then((r1: any) => {
if (r1.RowCount > 0) {
const entries = r1.RawSearchResults.PrimaryQueryResult.RefinementResults.Refiners[0].Entries;
const entries = r1.RawSearchResults.PrimaryQueryResult.RefinementResults.Refiners.results[0].Entries.results;
const allProps = entries.map((entry) => entry.RefinementName);

const filteredProps = allProps.filter(
Expand Down

0 comments on commit 6375d8d

Please sign in to comment.