mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-18 16:56:32 +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.
|
* containing the image.
|
||||||
*/
|
*/
|
||||||
export function isSourceDrive(drive: DrivelistDrive, image: Image): boolean {
|
export function isSourceDrive(drive: DrivelistDrive, image: Image): boolean {
|
||||||
|
image = image || {};
|
||||||
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;
|
||||||
@ -164,7 +165,7 @@ export const COMPATIBILITY_STATUS_TYPES = {
|
|||||||
*/
|
*/
|
||||||
export function getDriveImageCompatibilityStatuses(
|
export function getDriveImageCompatibilityStatuses(
|
||||||
drive: DrivelistDrive,
|
drive: DrivelistDrive,
|
||||||
image: Image,
|
image: Image = {},
|
||||||
) {
|
) {
|
||||||
const statusList = [];
|
const statusList = [];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user