azure-devops-node-api version: 10.2.1
Issue Description
global.window gets set in electron-link bundled applications, but global.window.navigator won't exist because it isn't a browser app, it's a node app. This means the current isBrowser check isn't quite enough, and the WebApi constructor will fail while trying to set the userAgent by accessing an undefined window.navigator.userAgent. I think a simple fix would be to also check window.navigator exists when calculating isBrowser.
Expected behaviour
isBrowser should not be true for electron-link (or any electron bundled) node apps.
Actual behaviour
isBrowser is true for electron-link (or possibly other electron bundled) node apps.
azure-devops-node-api version: 10.2.1
Issue Description
global.windowgets set inelectron-linkbundled applications, butglobal.window.navigatorwon't exist because it isn't a browser app, it's a node app. This means the currentisBrowsercheck isn't quite enough, and theWebApiconstructor will fail while trying to set theuserAgentby accessing an undefinedwindow.navigator.userAgent. I think a simple fix would be to also checkwindow.navigatorexists when calculatingisBrowser.Expected behaviour
isBrowsershould not betrueforelectron-link(or anyelectronbundled) node apps.Actual behaviour
isBrowseris true forelectron-link(or possibly otherelectronbundled) node apps.