Skip to content

Commit

Permalink
Guard for null data.data
Browse files Browse the repository at this point in the history
Closes qzind#811
  • Loading branch information
tresf committed May 10, 2021
1 parent 7f323a2 commit 15a7e38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/qz-tray.js
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ var qz = (function() {
if (data[i].constructor === Object) {
var absolute = false;

if (data[i].data.search(/data:image\/\w+;base64,/) === 0) {
if (data[i].data && data[i].data.search(/data:image\/\w+;base64,/) === 0) {
//upgrade from old base64 behavior
data[i].flavor = "base64";
data[i].data = data[i].data.replace(/^data:image\/\w+;base64,/, "");
Expand Down

0 comments on commit 15a7e38

Please sign in to comment.