Skip to content

Commit

Permalink
Fix optional chaining for links in ITwinGrid state management
Browse files Browse the repository at this point in the history
  • Loading branch information
arome committed Dec 4, 2024
1 parent 1d8060b commit 7ada16a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ const useIndividualState: IndividualITwinStateHook = (iTwin, props) => {
const data: IModelsFetchData = await response.json();
setIModels(data.iModels);
setLinks([
data._links.prev.href !== data._links.self.href
? data._links.prev.href
data._links.prev?.href !== data._links.self.href
? data._links.prev?.href
: undefined,
data._links.next.href !== data._links.self.href
? data._links.next.href
data._links.next?.href !== data._links.self.href
? data._links.next?.href
: undefined,
]);
if (data.iModels.length === 0) {
Expand Down

0 comments on commit 7ada16a

Please sign in to comment.