Remove deprecation warning for autoSubmit

This commit is contained in:
Kevin Sawicki 2016-11-28 14:51:24 -08:00
parent 2bf6f28152
commit bb9876bd6e

View file

@ -13,17 +13,17 @@ class CrashReporter {
options = {} options = {}
} }
this.productName = options.productName != null ? options.productName : app.getName() this.productName = options.productName != null ? options.productName : app.getName()
let {autoSubmit, companyName, extra, ignoreSystemCrashHandler, submitURL, uploadToServer} = options let {companyName, extra, ignoreSystemCrashHandler, submitURL, uploadToServer} = options
if (autoSubmit == null && uploadToServer == null) { if (uploadToServer == null) {
uploadToServer = true // TODO: Remove deprecated autoSubmit property in 2.0
} else { uploadToServer = options.autoSubmit
if (typeof autoSubmit !== 'undefined') {
// TODO: Remove depreceated property in 2.0.0
console.warn('The "autoSubmit" attribute on electron.crashReporter.start is depreceated. Please use "uploadToServer" instead.')
}
uploadToServer = uploadToServer || autoSubmit
} }
if (uploadToServer == null) {
uploadToServer = true
}
if (ignoreSystemCrashHandler == null) { if (ignoreSystemCrashHandler == null) {
ignoreSystemCrashHandler = false ignoreSystemCrashHandler = false
} }