diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-09-19 17:15:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-19 17:15:34 -0400 |
commit | 1078ab99b7a9d082ee36cbed69c8cb154db318b6 (patch) | |
tree | fd955de50b8e7dde93bd6c9324a9375e6df88d6d /ext/bg/js/settings/backup-controller.js | |
parent | 2ff4f830722940d2bfc35328fa913f93d04a330b (diff) |
Fix settings sanitization resulting in invalid data for the schema (#843)
Diffstat (limited to 'ext/bg/js/settings/backup-controller.js')
-rw-r--r-- | ext/bg/js/settings/backup-controller.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/bg/js/settings/backup-controller.js b/ext/bg/js/settings/backup-controller.js index 0676d451..80f83eb7 100644 --- a/ext/bg/js/settings/backup-controller.js +++ b/ext/bg/js/settings/backup-controller.js @@ -250,14 +250,14 @@ class BackupController { if (typeof fieldTemplates === 'string') { warnings.push('anki.fieldTemplates contains a non-default value'); if (!dryRun) { - delete anki.fieldTemplates; + anki.fieldTemplates = null; } } const server = anki.server; if (typeof server === 'string' && server.length > 0 && !this._isLocalhostUrl(server)) { warnings.push('anki.server uses a non-localhost URL'); if (!dryRun) { - delete anki.server; + anki.server = 'http://127.0.0.1:8765'; } } } @@ -268,7 +268,7 @@ class BackupController { if (typeof customSourceUrl === 'string' && customSourceUrl.length > 0 && !this._isLocalhostUrl(customSourceUrl)) { warnings.push('audio.customSourceUrl uses a non-localhost URL'); if (!dryRun) { - delete audio.customSourceUrl; + audio.customSourceUrl = ''; } } } |