|
|
@@ -46,7 +46,7 @@ const SentCellWidget = ({
|
|
|
const anchorInfo = useAppSelector(anchor);
|
|
|
const sid = `${sentData?.book}_${sentData?.para}_${sentData?.wordStart}_${sentData?.wordEnd}_${sentData?.channel.id}`;
|
|
|
useEffect(() => {
|
|
|
- if (discussionMessage?.resId === initValue?.id) {
|
|
|
+ if (discussionMessage && discussionMessage.resId === initValue?.id) {
|
|
|
setBgColor("wheat");
|
|
|
} else {
|
|
|
setBgColor("unset");
|
|
|
@@ -54,7 +54,7 @@ const SentCellWidget = ({
|
|
|
}, [discussionMessage?.resId, initValue?.id]);
|
|
|
|
|
|
useEffect(() => {
|
|
|
- if (anchorInfo?.resId === initValue?.id) {
|
|
|
+ if (anchorInfo && anchorInfo?.resId === initValue?.id) {
|
|
|
const ele = document.getElementById(sid);
|
|
|
ele?.scrollIntoView();
|
|
|
}
|