Skip to content

Commit

Permalink
#hotfix: fixed return data of redirects (#1064)
Browse files Browse the repository at this point in the history
  • Loading branch information
sc-ruslanmatkovskyi authored Jun 17, 2022
1 parent f761694 commit f96271f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/sitecore-jss/src/site/graphql-redirects-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,9 @@ export class GraphQLRedirectsService {
siteName,
});

try {
return redirectsResult.then((result: RedirectsQueryResult) => {
return result?.site?.siteInfo?.redirects;
});
} catch (e) {
return Promise.reject(e);
}
return redirectsResult
.then((result: RedirectsQueryResult) => result.site.siteInfo.redirects)
.catch((e) => Promise.reject(e));
}

/**
Expand Down

0 comments on commit f96271f

Please sign in to comment.