diff --git a/lib/core-server/src/utils/open-in-browser.ts b/lib/core-server/src/utils/open-in-browser.ts index daa5938b3f07..bf98fbf9dd48 100644 --- a/lib/core-server/src/utils/open-in-browser.ts +++ b/lib/core-server/src/utils/open-in-browser.ts @@ -7,7 +7,7 @@ import dedent from 'ts-dedent'; export function openInBrowser(address: string) { getDefaultBrowser(async (err: any, res: any) => { try { - if (res.isChrome || res.isChromium) { + if (res && (res.isChrome || res.isChromium)) { // We use betterOpn for Chrome because it is better at handling which chrome tab // or window the preview loads in. betterOpn(address);