Remove incorrect check in random.pick

This commit is contained in:
pyoor 2018-07-30 10:36:46 -04:00
parent b2a73e5130
commit 385894b5ac
1 changed files with 0 additions and 5 deletions

View File

@ -114,11 +114,6 @@ class random {
* @returns {*}
*/
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') {
return obj()
} else if (Array.isArray(obj)) {