mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
fix(tray): error if today's note was missing
This commit is contained in:
parent
43ba49833d
commit
e10256e5bd
@ -12,6 +12,7 @@ import type BRecentNote from "../becca/entities/brecent_note.js";
|
||||
import { ipcMain, nativeTheme } from "electron/main";
|
||||
import { default as i18next, t } from "i18next";
|
||||
import { isDev } from "./utils.js";
|
||||
import cls from "./cls.js";
|
||||
|
||||
let tray: Tray;
|
||||
// `mainWindow.isVisible` doesn't work with `mainWindow.show` and `mainWindow.hide` - it returns `false` when the window
|
||||
@ -164,7 +165,7 @@ function updateTrayMenu() {
|
||||
label: t("tray.today"),
|
||||
type: "normal",
|
||||
icon: getIconPath("today"),
|
||||
click: () => openInSameTab(date_notes.getTodayNote())
|
||||
click: cls.wrap(() => openInSameTab(date_notes.getTodayNote()))
|
||||
},
|
||||
{
|
||||
label: t("tray.bookmarks"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user