Remove incorrect check in random.pick

This commit is contained in:
pyoor 2018-07-30 10:36:46 -04:00
parent b2a73e5130
commit 385894b5ac

View file

@ -114,11 +114,6 @@ class random {
* @returns {*} * @returns {*}
*/ */
static pick (obj) { static pick (obj) {
if (!(Array.isArray(obj) || typeof obj === 'function')) {
logger.traceback()
throw new TypeError(`random.pick() received invalid object: (${obj})`)
}
if (typeof obj === 'function') { if (typeof obj === 'function') {
return obj() return obj()
} else if (Array.isArray(obj)) { } else if (Array.isArray(obj)) {