You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I was running into an issue today with the following exception:
TypeError: undefined is not a function
at /var/www/.../node_modules/redis-lock/index.js:75:6
which seems to be for the call to done(). In my code, I have something like:
lock('abc', function (done) {
...
done()
}
That logic in index.js from 71-76 I think needs to check if done is defined or not before using it. Most of the time it may not matter because lockTimeoutValue is generally in the future so the else condition never gets triggered, but when it does, then you'll wind up with the undefined exception.
Does that make sense or am I missing something?
The text was updated successfully, but these errors were encountered:
Hi,
I was running into an issue today with the following exception:
which seems to be for the call to
done()
. In my code, I have something like:That logic in index.js from 71-76 I think needs to check if done is defined or not before using it. Most of the time it may not matter because lockTimeoutValue is generally in the future so the else condition never gets triggered, but when it does, then you'll wind up with the undefined exception.
Does that make sense or am I missing something?
The text was updated successfully, but these errors were encountered: