xo: Fix unicorn/prevent-abbreviations.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2024-03-22 15:52:29 -07:00
parent 86e28f5b00
commit 47366b7617
37 changed files with 425 additions and 383 deletions

View File

@@ -18,10 +18,10 @@ export function newNotification(
): NotificationData {
const notification = new Notification(title, {...options, silent: true});
for (const type of ["click", "close", "error", "show"]) {
notification.addEventListener(type, (ev) => {
notification.addEventListener(type, (event) => {
if (type === "click") ipcRenderer.send("focus-this-webview");
if (!dispatch(type, ev)) {
ev.preventDefault();
if (!dispatch(type, event)) {
event.preventDefault();
}
});
}