diff --git a/src/index.js b/src/index.js index 306715a..29b24bf 100644 --- a/src/index.js +++ b/src/index.js @@ -17,11 +17,9 @@ const protectedproperties = (() => { .filter(prop => global[prop]); })(); -const getType = val => Object.prototype.toString.call(val); - module.exports = (...args) => { - const properties = args.filter(arg => getType(arg) === '[object Array]')[0]; - const userJsdomConfig = args.filter(arg => getType(arg) === '[object Object]')[0]; + const properties = args.filter(arg => Array.isArray(arg))[0]; + const userJsdomConfig = args.filter(arg => !Array.isArray(arg))[0]; const jsdomConfig = Object.assign({}, userJsdomConfig, defaultJsdomConfig);