Skip to content

Commit

Permalink
fix: Launcher freeze
Browse files Browse the repository at this point in the history
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
  • Loading branch information
GeekCornerGH authored May 23, 2022
1 parent 2e1ab3c commit 8a591ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/assets/js/scripts/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,13 +368,13 @@ ipcRenderer.on(MSFT_OPCODE.REPLY_LOGIN, (_, ...arguments_) => {
const viewOnClose = arguments_[2]

// Error from request to Microsoft.
if (Object.prototype.hasOwnProperty.call(queryMap, 'error')) {
if (Object.prototype.hasOwnProperty.call(queryMap, error)) {
switchView(getCurrentView(), viewOnClose, 500, 500, () => {
// TODO Dont know what these errors are. Just show them I guess.
// 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)
console.log(error_description)
console.log(queryMap.error_description)
console.log('Full query map', queryMap)
let error = queryMap.error // Error might be 'access_denied' ?
let errorDesc = queryMap.error_description
Expand Down Expand Up @@ -1534,4 +1534,4 @@ function prepareSettings(first = false) {
}

// Prepare the settings UI on startup.
//prepareSettings(true)
//prepareSettings(true)

0 comments on commit 8a591ed

Please sign in to comment.