diff --git a/src/components/apphost.js b/src/components/apphost.js index 1d66f51044..2ae64f97b0 100644 --- a/src/components/apphost.js +++ b/src/components/apphost.js @@ -275,7 +275,7 @@ const supportedFeatures = function () { */ function doExit() { try { - if (window.NativeShell && window.NativeShell.AppHost.exit) { + if (window.NativeShell?.AppHost?.exit) { window.NativeShell.AppHost.exit(); } else if (browser.tizen) { tizen.application.getCurrentApplication().exit();