From bb9876bd6e7057a407664ae8ec75f2d381815ced Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 28 Nov 2016 14:51:24 -0800 Subject: [PATCH] Remove deprecation warning for autoSubmit --- lib/common/api/crash-reporter.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/common/api/crash-reporter.js b/lib/common/api/crash-reporter.js index a9509e4ed310..c5a462cf5110 100644 --- a/lib/common/api/crash-reporter.js +++ b/lib/common/api/crash-reporter.js @@ -13,17 +13,17 @@ class CrashReporter { options = {} } 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) { - uploadToServer = true - } else { - 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) { + // TODO: Remove deprecated autoSubmit property in 2.0 + uploadToServer = options.autoSubmit } + + if (uploadToServer == null) { + uploadToServer = true + } + if (ignoreSystemCrashHandler == null) { ignoreSystemCrashHandler = false }