diff --git a/src/display/api.js b/src/display/api.js index b9abc3bea..79e22de9e 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -549,10 +549,9 @@ function getDataProp(val) { typeof Buffer !== "undefined" && // eslint-disable-line no-undef val instanceof Buffer // eslint-disable-line no-undef ) { - deprecated( + throw new Error( "Please provide binary data as `Uint8Array`, rather than `Buffer`." ); - return new Uint8Array(val); } if (val instanceof Uint8Array && val.byteLength === val.buffer.byteLength) { // Use the data as-is when it's already a Uint8Array that completely