msavin / userCache

The one simple trick that can save you millions of database requests
MIT License
35 stars 6 forks source link

Fix for type check on return value of _getField #4

Closed robsecord closed 6 years ago

robsecord commented 6 years ago

The function _getField is returning a Boolean value due to type-coersion with !! so testing the return value against undefined would never succeed. Instead we should be checking the state of the boolean which has been returned.

robsecord commented 6 years ago

Just noticed where this function returns undefined. My mistake, closing PR.