diff --git a/src/cmap/connection.ts b/src/cmap/connection.ts index 265ea7a1c0..85f6000817 100644 --- a/src/cmap/connection.ts +++ b/src/cmap/connection.ts @@ -384,8 +384,7 @@ export class Connection extends TypedEventEmitter { } else { // Get the first orphaned operation description. const entry = this[kQueue].entries().next(); - /* eslint no-restricted-syntax: 0 */ - if (entry.value !== undefined) { + if (entry.value != null) { const [requestId, orphaned]: [number, OperationDescription] = entry.value; // If the orphaned operation description exists then set it. operationDescription = orphaned; diff --git a/test/unit/cmap/connection.test.ts b/test/unit/cmap/connection.test.ts index b6ab033a11..5c8d872bb8 100644 --- a/test/unit/cmap/connection.test.ts +++ b/test/unit/cmap/connection.test.ts @@ -311,7 +311,7 @@ describe('new Connection()', function () { const message = new BinMsg(msg, msgHeader, msgBody); expect(() => { connection.onMessage(message); - }).to.not.throw(/undefined is not iterable/); + }).to.not.throw(); }); });