Fix saving settings when no default list was selected

This commit is contained in:
kolaente 2021-07-17 23:11:57 +02:00
parent 901aabe976
commit dc0a2defda
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 1 additions and 2 deletions

View File

@ -36,7 +36,6 @@ describe('User Settings', () => {
.contains('Save')
.click()
cy.wait(3000) // Wait for the request to finish
cy.get('.global-notification')
.should('contain', 'Success')
cy.get('.navbar .user .username')

View File

@ -440,7 +440,7 @@ export default {
updateSettings() {
localStorage.setItem(playSoundWhenDoneKey, this.playSoundWhenDone)
saveLanguage(this.language)
this.settings.defaultListId = this.defaultList.id
this.settings.defaultListId = this.defaultList ? this.defaultList.id : 0
this.userSettingsService.update(this.settings)
.then(() => {