- Update: Bump StackBlur version
This commit is contained in:
@@ -91,7 +91,7 @@ function processImage(img, canvas, radius, blurAlphaChannel) {
|
||||
* @param {Integer} topY
|
||||
* @param {Integer} width
|
||||
* @param {Integer} height
|
||||
* @throws {Error}
|
||||
* @throws {Error|TypeError}
|
||||
* @returns {ImageData} See {@link https://html.spec.whatwg.org/multipage/canvas.html#imagedata}
|
||||
*/
|
||||
|
||||
@@ -101,8 +101,8 @@ function getImageDataFromCanvas(canvas, topX, topY, width, height) {
|
||||
canvas = document.getElementById(canvas);
|
||||
}
|
||||
|
||||
if (!canvas || !('getContext' in canvas)) {
|
||||
return;
|
||||
if (!canvas || typeof canvas !== 'object' || !('getContext' in canvas)) {
|
||||
throw new TypeError('Expecting canvas with `getContext` method in processCanvasRGB(A) calls!');
|
||||
}
|
||||
|
||||
const context = canvas.getContext('2d');
|
||||
|
||||
Reference in New Issue
Block a user