Skip to content

Commit

Permalink
Make sure strings are converted to numbers / booleans with normal use #…
Browse files Browse the repository at this point in the history
  • Loading branch information
lindell committed Nov 6, 2016
1 parent d0913d7 commit fd1ad1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/JsBarcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import merge from './help/merge.js';
import linearizeEncodings from './help/linearizeEncodings.js';
import fixOptions from './help/fixOptions.js';
import getRenderProperties from './help/getRenderProperties.js';
import optionsFromStrings from './help/optionsFromStrings.js';

// Exceptions
import ErrorHandler from './exceptions/ErrorHandler.js';
Expand Down Expand Up @@ -66,6 +67,7 @@ function registerBarcode(barcodes, name){
var api = this;
return api._errorHandler.wrapBarcodeCall(function(){
var newOptions = merge(api._options, options);
newOptions = optionsFromStrings(newOptions);
var Encoder = barcodes[name];
var encoded = encode(text, Encoder, newOptions);
api._encodings.push(encoded);
Expand Down

0 comments on commit fd1ad1b

Please sign in to comment.