Skip to content

Commit

Permalink
Don't send config.spool to older versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
tresf committed Nov 13, 2020
1 parent c9120d0 commit a7d55d0
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions js/qz-tray.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

/**
* @version 2.1.3-RC1
* @version 2.1.2+20
* @overview QZ Tray Connector
* <p/>
* Connects a web client to the QZ Tray software.
Expand Down Expand Up @@ -38,7 +38,7 @@ var qz = (function() {
///// PRIVATE METHODS /////

var _qz = {
VERSION: "2.1.3-RC1", //must match @version above
VERSION: "2.1.2+20", //must match @version above
DEBUG: false,

log: {
Expand Down Expand Up @@ -766,14 +766,17 @@ var qz = (function() {
config.rasterize = true;
}
}
if(_qz.tools.versionCompare(2, 1, 3) < 0) {
if(config.spool && config.spool.size) {
config.perSpool = config.spool.size;
delete config.spool.size;
}
if(config.spool && config.spool.end) {
config.endOfDoc = config.spool.end;
delete config.spool.end;
if(_qz.tools.versionCompare(2, 1, 2, 20) < 0) {
if(config.spool) {
if(config.spool.size) {
config.perSpool = config.spool.size;
delete config.spool.size;
}
if(config.spool.end) {
config.endOfDoc = config.spool.end;
delete config.spool.end;
}
delete config.spool;
}
}
return config;
Expand Down

0 comments on commit a7d55d0

Please sign in to comment.