Skip to content

Commit

Permalink
Merge pull request #108 from Remo/load-empty-string
Browse files Browse the repository at this point in the history
Don't create canvas from empty string
  • Loading branch information
szimek committed Nov 7, 2015
2 parents ddade90 + 07efde7 commit 48fc0b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions signature_pad.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ var SignaturePad = (function (document) {
};

SignaturePad.prototype.fromDataURL = function (dataUrl) {
if (!dataUrl) {
return;
}
var self = this,
image = new Image(),
ratio = window.devicePixelRatio || 1,
Expand Down

0 comments on commit 48fc0b2

Please sign in to comment.