Skip to content

Commit

Permalink
fix: withQuerystringResults @id in content
Browse files Browse the repository at this point in the history
  • Loading branch information
mamico committed Oct 3, 2024
1 parent 437b242 commit b61e706
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default function withQuerystringResults(WrappedComponent) {
const [additionalFilters, setAdditionalFilters] = React.useState([]);

const originalQuery = useSelector((state) => {
return state.originalQuery?.[properties['@id']]?.[
return state.originalQuery?.[properties?.['@id'] || content?.['@id']]?.[
subrequestID
]?.toArray?.();
});
Expand Down Expand Up @@ -153,13 +153,13 @@ export default function withQuerystringResults(WrappedComponent) {
useEffect(() => {
if (
!originalQuery &&
properties['@id'] &&
(properties?.['@id'] || content?.['@id']) &&
data.block &&
querystring.query?.length > 0
) {
dispatch(
setOriginalQuery(
properties['@id'],
properties?.['@id'] || content?.['@id'],
data.block,
JSON.parse(JSON.stringify(querystring.query)),
),
Expand Down

0 comments on commit b61e706

Please sign in to comment.