Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Serialize settings as JSON when sending them to the main process #16809

Merged
merged 1 commit into from Feb 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/application-delegate.js
Expand Up @@ -182,7 +182,7 @@ class ApplicationDelegate {
async setUserSettings (config) {
this.pendingSettingsUpdateCount++
try {
await ipcHelpers.call('set-user-settings', config)
await ipcHelpers.call('set-user-settings', JSON.stringify(config))
} finally {
this.pendingSettingsUpdateCount--
}
Expand Down
2 changes: 1 addition & 1 deletion src/main-process/atom-application.js
Expand Up @@ -559,7 +559,7 @@ class AtomApplication extends EventEmitter {
}))

this.disposable.add(ipcHelpers.respondTo('set-user-settings', (window, settings) =>
this.configFile.update(settings)
this.configFile.update(JSON.parse(settings))
))

this.disposable.add(ipcHelpers.respondTo('center-window', window => window.center()))
Expand Down