From 8cc61bf57719d3e5d54278cc2cc2cf00148b6c28 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 7 Oct 2021 21:49:13 +0200 Subject: [PATCH] lib/client: handle MONITOR without value in ISUPPORT --- lib/client.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/client.js b/lib/client.js index 3553e8d..1e685fb 100644 --- a/lib/client.js +++ b/lib/client.js @@ -790,7 +790,11 @@ export default class Client extends EventTarget { if (!this.isupport.has("MONITOR")) { return 0; } - return parseInt(this.isupport.get("MONITOR"), 10); + let v = this.isupport.get("MONITOR"); + if (v === "") { + return Infinity; + } + return parseInt(v, 10); } monitor(target) {