bug: null location data on thread
This commit is contained in:
parent
0caa1c97db
commit
d24fc57962
@ -249,7 +249,7 @@ export default function Thread() {
|
|||||||
const root = useMemo(() => {
|
const root = useMemo(() => {
|
||||||
const currentNote =
|
const currentNote =
|
||||||
thread.data?.find(ne => ne.id === currentId) ??
|
thread.data?.find(ne => ne.id === currentId) ??
|
||||||
("sig" in location.state ? (location.state as TaggedRawEvent) : undefined);
|
(location.state && "sig" in location.state ? (location.state as TaggedRawEvent) : undefined);
|
||||||
if (currentNote) {
|
if (currentNote) {
|
||||||
const currentThread = EventExt.extractThread(currentNote);
|
const currentThread = EventExt.extractThread(currentNote);
|
||||||
const isRoot = (ne?: ThreadInfo) => ne === undefined;
|
const isRoot = (ne?: ThreadInfo) => ne === undefined;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user