mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-22 10:46:31 +00:00
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 <lorenzothunder.ambrosi@gmail.com>
This commit is contained in:
parent
d62cbdc391
commit
c9cbe41f9e
@ -58,8 +58,10 @@ export interface Image {
|
|||||||
* In the context of Etcher, a source drive is a drive
|
* In the context of Etcher, a source drive is a drive
|
||||||
* containing the image.
|
* containing the image.
|
||||||
*/
|
*/
|
||||||
export function isSourceDrive(drive: DrivelistDrive, image: Image): boolean {
|
export function isSourceDrive(
|
||||||
image = image || {};
|
drive: DrivelistDrive,
|
||||||
|
image: Image = {},
|
||||||
|
): boolean {
|
||||||
for (const mountpoint of drive.mountpoints || []) {
|
for (const mountpoint of drive.mountpoints || []) {
|
||||||
if (image.path !== undefined && pathIsInside(image.path, mountpoint.path)) {
|
if (image.path !== undefined && pathIsInside(image.path, mountpoint.path)) {
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user