refactor: throw error for getLastCrashReport if crashReporter not started (#21643)
This commit is contained in:
		
					parent
					
						
							
								7d2c97b671
							
						
					
				
			
			
				commit
				
					
						d56f67b7af
					
				
			
		
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -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 () { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Shelley Vohr
				Shelley Vohr