fix: Throwing event as error
This commit is contained in:
@@ -146,8 +146,8 @@ const insertFiles = function (
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
newImg.onerror = (error) => {
|
newImg.onerror = (event) => {
|
||||||
throw error;
|
throw new Error(`Error loading image: ${event}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
newImg.src = src;
|
newImg.src = src;
|
||||||
|
|||||||
Reference in New Issue
Block a user