fix launcher_profiles.json problems (#813)

fixes launcher_profiles.json (formerly launcher_accounts.json) not being written to (all clienttokens being deleted) in specific cases
This commit is contained in:
Rob9315 2021-01-30 01:22:12 +01:00 committed by GitHub
parent 10984fd5d5
commit bf309ba5a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,6 +50,7 @@ module.exports = async function (client, options) {
const cb = function (err, session) {
if (options.profilesFolder) {
getLauncherProfiles().then((auths) => {
if (!auths.authenticationDatabase) auths.authenticationDatabase = []
try {
const lowerUsername = options.username.toLowerCase()
let profile = Object.keys(auths.authenticationDatabase).find(key =>