Skip to content

Commit

Permalink
fix(emoji): siyuan-note#13509
Browse files Browse the repository at this point in the history
  • Loading branch information
TCOTC committed Dec 24, 2024
1 parent 246d4d0 commit 681a836
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/emoji/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ export const openEmojiPanel = (id: string, type: "doc" | "notebook" | "av", posi
if (target.classList.contains("emojis__type")) {
const titleElement = emojisContentElement.querySelector(`[data-type="${target.getAttribute("data-type")}"]`) as HTMLElement;
if (titleElement) {
const previousIndex = titleElement.previousElementSibling ? titleElement.previousElementSibling.getAttribute("data-index") : null;
const previousIndex = titleElement.previousElementSibling?.getAttribute("data-index");
const index = titleElement.nextElementSibling.getAttribute("data-index");

if (previousIndex) {
Expand Down

0 comments on commit 681a836

Please sign in to comment.