mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
refactor: use optional chaining / nullish coalescing operator (#35217)
This commit is contained in:
@@ -9,8 +9,7 @@ let currentlyRunning: {
|
||||
|
||||
// |options.types| can't be empty and must be an array
|
||||
function isValid (options: Electron.SourcesOptions) {
|
||||
const types = options ? options.types : undefined;
|
||||
return Array.isArray(types);
|
||||
return Array.isArray(options?.types);
|
||||
}
|
||||
|
||||
export async function getSources (args: Electron.SourcesOptions) {
|
||||
|
||||
Reference in New Issue
Block a user