fix: Launcher freeze

If you were opening the MS Login while in settings and close the window before finishing auth, the launcher throws an error. This patch fixes the issue
This commit is contained in:
GeekCorner 2022-05-23 13:11:04 +02:00 committed by GitHub
parent 2e1ab3c266
commit 8a591ed23f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -368,13 +368,13 @@ ipcRenderer.on(MSFT_OPCODE.REPLY_LOGIN, (_, ...arguments_) => {
const viewOnClose = arguments_[2] const viewOnClose = arguments_[2]
// Error from request to Microsoft. // Error from request to Microsoft.
if (Object.prototype.hasOwnProperty.call(queryMap, 'error')) { if (Object.prototype.hasOwnProperty.call(queryMap, error)) {
switchView(getCurrentView(), viewOnClose, 500, 500, () => { switchView(getCurrentView(), viewOnClose, 500, 500, () => {
// TODO Dont know what these errors are. Just show them I guess. // TODO Dont know what these errors are. Just show them I guess.
// This is probably if you messed up the app registration with Azure. // This is probably if you messed up the app registration with Azure.
console.log('Error getting authCode, is Azure application registered correctly?') console.log('Error getting authCode, is Azure application registered correctly?')
console.log(error) console.log(error)
console.log(error_description) console.log(queryMap.error_description)
console.log('Full query map', queryMap) console.log('Full query map', queryMap)
let error = queryMap.error // Error might be 'access_denied' ? let error = queryMap.error // Error might be 'access_denied' ?
let errorDesc = queryMap.error_description let errorDesc = queryMap.error_description