From 07efde77b6d14a576734cc4526d26c34383182e8 Mon Sep 17 00:00:00 2001 From: remolaubacher Date: Wed, 17 Jun 2015 08:30:38 +0200 Subject: [PATCH] don't create canvas from empty string --- signature_pad.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/signature_pad.js b/signature_pad.js index dac9a26c..4dc31906 100644 --- a/signature_pad.js +++ b/signature_pad.js @@ -115,6 +115,9 @@ var SignaturePad = (function (document) { }; SignaturePad.prototype.fromDataURL = function (dataUrl) { + if (!dataUrl) { + return; + } var self = this, image = new Image(), ratio = window.devicePixelRatio || 1,