From 1cd34c900db19d9e57cd50a485deef043cd60545 Mon Sep 17 00:00:00 2001 From: Rodrigo Vieira Date: Tue, 14 May 2019 15:27:52 -0400 Subject: [PATCH] Fix init loop conditional --- src/js/init.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/js/init.js b/src/js/init.js index 5f72af5..a3551ef 100644 --- a/src/js/init.js +++ b/src/js/init.js @@ -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)