Skip to content

Commit 598aa6f

Browse files
committed
webview: Adjust app.dock feature test for TypeScript friendliness.
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent 2e7ed45 commit 598aa6f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

app/renderer/js/components/webview.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type {WebContents} from "electron/main";
22
import fs from "node:fs";
3-
import process from "node:process";
43

54
import * as remote from "@electron/remote";
65
import {app, dialog} from "@electron/remote";
@@ -251,10 +250,7 @@ export default class WebView {
251250
webContents.on("page-favicon-updated", (_event, favicons) => {
252251
// This returns a string of favicons URL. If there is a PM counts in unread messages then the URL would be like
253252
// https://chat.zulip.org/static/images/favicon/favicon-pms.png
254-
if (
255-
favicons[0].indexOf("favicon-pms") > 0 &&
256-
process.platform === "darwin"
257-
) {
253+
if (favicons[0].indexOf("favicon-pms") > 0 && app.dock !== undefined) {
258254
// This api is only supported on macOS
259255
app.dock.setBadge("●");
260256
// Bounce the dock

0 commit comments

Comments
 (0)