diff --git a/lib/common/crash-reporter.js b/lib/common/crash-reporter.js index 9219af0807d5..bae09ddc7b4b 100644 --- a/lib/common/crash-reporter.js +++ b/lib/common/crash-reporter.js @@ -54,7 +54,12 @@ class CrashReporter { } getUploadedReports () { - return binding.getUploadedReports(this.getCrashesDirectory()) + const crashDir = this.getCrashesDirectory() + if (!crashDir) { + throw new Error('crashReporter has not been started') + } + + return binding.getUploadedReports(crashDir) } getCrashesDirectory () {