From c9cbe41f9eb38f5db65427ee17066d2700b199ae Mon Sep 17 00:00:00 2001 From: Lorenzo Alberto Maria Ambrosi Date: Thu, 21 May 2020 12:26:01 +0200 Subject: [PATCH] Init param in correct place Change-type: patch Changelog-entry: Minor fix - Init isSourceDrive param in correct place Signed-off-by: Lorenzo Alberto Maria Ambrosi --- lib/shared/drive-constraints.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/shared/drive-constraints.ts b/lib/shared/drive-constraints.ts index 523e6cf3..b534933f 100644 --- a/lib/shared/drive-constraints.ts +++ b/lib/shared/drive-constraints.ts @@ -58,8 +58,10 @@ export interface Image { * In the context of Etcher, a source drive is a drive * containing the image. */ -export function isSourceDrive(drive: DrivelistDrive, image: Image): boolean { - image = image || {}; +export function isSourceDrive( + drive: DrivelistDrive, + image: Image = {}, +): boolean { for (const mountpoint of drive.mountpoints || []) { if (image.path !== undefined && pathIsInside(image.path, mountpoint.path)) { return true;