mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 15:27:17 +00:00
Fix undefined image from DriveCompatibilityWarning
Fixes: #3160 Change-type: patch Changelog-entry: Fix undefined image from DriveCompatibilityWarning
This commit is contained in:
parent
c25db503e0
commit
31bd8ce7ae
@ -59,6 +59,7 @@ export interface Image {
|
||||
* containing the image.
|
||||
*/
|
||||
export function isSourceDrive(drive: DrivelistDrive, image: Image): boolean {
|
||||
image = image || {};
|
||||
for (const mountpoint of drive.mountpoints || []) {
|
||||
if (image.path !== undefined && pathIsInside(image.path, mountpoint.path)) {
|
||||
return true;
|
||||
@ -164,7 +165,7 @@ export const COMPATIBILITY_STATUS_TYPES = {
|
||||
*/
|
||||
export function getDriveImageCompatibilityStatuses(
|
||||
drive: DrivelistDrive,
|
||||
image: Image,
|
||||
image: Image = {},
|
||||
) {
|
||||
const statusList = [];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user