Skip to content

Commit

Permalink
Fix init loop conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
crabbly committed May 14, 2019
1 parent bbcb192 commit 1cd34c9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,11 @@ export default {
params.printable = args.printable
params.fallbackPrintable = typeof args.fallbackPrintable !== 'undefined' ? args.fallbackPrintable : params.printable
params.base64 = typeof args.base64 !== 'undefined'

for (var k in params) {
if (k === 'printable' || k === 'fallbackPrintable' || k === 'base64') return;
params[k] = typeof args[k] !== 'undefined' ? args[k] : params[k];
if (k === 'printable' || k === 'fallbackPrintable' || k === 'base64') continue

params[k] = typeof args[k] !== 'undefined' ? args[k] : params[k]
}

break
default:
throw new Error('Unexpected argument type! Expected "string" or "object", got ' + typeof args)
Expand Down

0 comments on commit 1cd34c9

Please sign in to comment.