From 15a7e38c4c0e5df4673c71a5368dc7f38bfa5190 Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Mon, 10 May 2021 15:47:46 -0400 Subject: [PATCH] Guard for null data.data Closes #811 --- js/qz-tray.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/qz-tray.js b/js/qz-tray.js index 363c90e42..8f54e6397 100644 --- a/js/qz-tray.js +++ b/js/qz-tray.js @@ -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,/, "");