isBrowser
check erroneously passes for electron-link
bundled node
applications
#436
Labels
isBrowser
check erroneously passes for electron-link
bundled node
applications
#436
azure-devops-node-api version: 10.2.1
Issue Description
global.window
gets set inelectron-link
bundled applications, butglobal.window.navigator
won't exist because it isn't a browser app, it's a node app. This means the currentisBrowser
check isn't quite enough, and theWebApi
constructor will fail while trying to set theuserAgent
by accessing an undefinedwindow.navigator.userAgent
. I think a simple fix would be to also checkwindow.navigator
exists when calculatingisBrowser
.Expected behaviour
isBrowser
should not betrue
forelectron-link
(or anyelectron
bundled) node apps.Actual behaviour
isBrowser
is true forelectron-link
(or possibly otherelectron
bundled) node apps.The text was updated successfully, but these errors were encountered: