Skip to content

Commit

Permalink
Fix bugs in setter
Browse files Browse the repository at this point in the history
  • Loading branch information
eKoopmans committed Feb 20, 2018
1 parent 141ba2a commit 2d5856f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,16 +301,16 @@ Worker.prototype.set = function set(opt) {
// TODO: Test null/undefined input to this function.
// TODO: Implement ordered pairs?
for (var key in opt) {
if (key in Worker.template) {
// Set root-level properties.
this[key] = opt[key];
if (key in Worker.template.prop) {
// Set pre-defined properties.
this.prop[key] = opt[key];
} else {
switch (key) {
case 'margin':
this.setMargin(opt.margin);
break;
case 'jsPDF':
this.jsPDF = opt.jsPDF;
this.opt.jsPDF = opt.jsPDF;
case 'pageSize':
this.setPageSize(opt.pageSize);
break;
Expand Down

0 comments on commit 2d5856f

Please sign in to comment.