Clone options parameter before modifying it.

This commit is contained in:
Jesse Grosjean 2015-06-08 20:40:15 -04:00
parent 1dbfd0b5ac
commit 6cdc555a93

View File

@ -786,6 +786,8 @@ class Atom extends Model
showSaveDialogSync: (options={}) ->
if _.isString(options)
options = defaultPath: options
else
options = _.clone(options)
currentWindow = @getCurrentWindow()
dialog = remote.require('dialog')
options.title ?= 'Save File'