Skip to content

Commit 823f0b7

Browse files
committed
fix(emoji): #13509
1 parent 179933c commit 823f0b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/emoji/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export const openEmojiPanel = (id: string, type: "doc" | "notebook" | "av", posi
523523
if (target.classList.contains("emojis__type")) {
524524
const titleElement = emojisContentElement.querySelector(`[data-type="${target.getAttribute("data-type")}"]`) as HTMLElement;
525525
if (titleElement) {
526-
const previousIndex = titleElement.previousElementSibling.getAttribute("data-index");
526+
const previousIndex = titleElement.previousElementSibling ? titleElement.previousElementSibling.getAttribute("data-index") : null;
527527
const index = titleElement.nextElementSibling.getAttribute("data-index");
528528

529529
if (previousIndex) {

0 commit comments

Comments
 (0)