1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

fix dirty selected DB check

This commit is contained in:
Leibale
2024-01-29 08:29:55 -05:00
parent f7f51b9c92
commit 1006e3b29f

View File

@@ -909,7 +909,7 @@ export default class RedisClient<
*/
resetIfDirty() {
let shouldReset = false;
if (this._self.#selectedDB !== this._self.#options?.database ?? 0) {
if (this._self.#selectedDB !== (this._self.#options?.database ?? 0)) {
console.warn('Returning a client with a different selected DB');
shouldReset = true;
}