diff --git a/lib/common/crash-reporter.js b/lib/common/crash-reporter.js index ae651f9523ba2..8e4dbbf4a2885 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 () {