Update src/components/apphost.js

Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
Ian Walton 2021-05-04 17:03:39 -04:00 committed by GitHub
parent 123ff9f834
commit 17b3a2aa05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();