Skip to content

Commit 6acaa93

Browse files
committed
Merge branch 'dev' into feature/2132-workflow-status
2 parents bbd2907 + 8e2a44b commit 6acaa93

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

src/shell/components/Comment/CommentsList.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,12 @@ export const CommentsList = ({
7373
}
7474

7575
setTimeout(() => {
76-
const { top, bottom } = topOffsetRef.current?.getBoundingClientRect();
76+
if (topOffsetRef.current?.getBoundingClientRect()) {
77+
const { top, bottom } = topOffsetRef.current.getBoundingClientRect();
7778

78-
setPopperTopOffset(top);
79-
setPopperBottomOffset(bottom);
79+
setPopperTopOffset(top);
80+
setPopperBottomOffset(bottom);
81+
}
8082
});
8183

8284
// HACK: Prevents UI flicker when popper renders and is temporarily out of bounds

src/shell/components/load-instance/index.js

+13-8
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,19 @@ export default connect((state) => {
4646
return;
4747
}
4848

49-
props.dispatch(fetchInstance()).then((res) => {
50-
if (res.status !== 200) {
51-
setError("You do not have permission to access this instance");
52-
} else {
53-
document.title = `Manager - ${res.data?.name} - Zesty`;
54-
CONFIG.URL_PREVIEW_FULL = `${CONFIG.URL_PREVIEW_PROTOCOL}${res.data?.randomHashID}${CONFIG.URL_PREVIEW}`;
55-
}
56-
});
49+
props
50+
.dispatch(fetchInstance())
51+
.then((res) => {
52+
if (res.status !== 200) {
53+
setError("You do not have permission to access this instance");
54+
} else {
55+
document.title = `Manager - ${res.data?.name} - Zesty`;
56+
CONFIG.URL_PREVIEW_FULL = `${CONFIG.URL_PREVIEW_PROTOCOL}${res.data?.randomHashID}${CONFIG.URL_PREVIEW}`;
57+
}
58+
})
59+
.catch(() => {
60+
setError("Failed to load instance");
61+
});
5762

5863
Promise.all([
5964
props.dispatch(fetchUser(props.user.ZUID)),

src/shell/store/instance.js

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export function fetchInstance() {
4646
})
4747
.catch((err) => {
4848
console.error("fetchInstance failed:", err);
49+
return Promise.reject(err);
4950
});
5051
};
5152
}

0 commit comments

Comments
 (0)