From 21849f79c82f5caab1d10322e7488800fdec033c Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 9 Jul 2016 22:21:07 -0700 Subject: [PATCH] Get rid of default parameter values in toBlob polyfill as toDataURL has the same defaults. --- src/General/Polyfill.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/General/Polyfill.coffee b/src/General/Polyfill.coffee index 6bb91c3ad..147035396 100644 --- a/src/General/Polyfill.coffee +++ b/src/General/Polyfill.coffee @@ -5,7 +5,7 @@ Polyfill = return toBlob: -> return if HTMLCanvasElement::toBlob - HTMLCanvasElement::toBlob = (cb, type='image/png', encoderOptions=null) -> + HTMLCanvasElement::toBlob = (cb, type, encoderOptions) -> url = @toDataURL type, encoderOptions data = atob url[url.indexOf(',')+1..] # DataUrl to Binary code from Aeosynth's 4chan X repo @@ -13,5 +13,5 @@ Polyfill = ui8a = new Uint8Array l for i in [0...l] by 1 ui8a[i] = data.charCodeAt i - cb new Blob [ui8a], {type} + cb new Blob [ui8a], {type: type or 'image/png'} return