From ec2f16ef2e60ffcc83d00464b46b9c7224ed04d0 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Fri, 27 May 2022 10:52:05 +1000 Subject: [PATCH] Misc --- src/kernels/jupyter/baseKernelConnectionWrapper.ts | 2 +- src/test/common.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/kernels/jupyter/baseKernelConnectionWrapper.ts b/src/kernels/jupyter/baseKernelConnectionWrapper.ts index 0e9ea559e81..6a828ed19e2 100644 --- a/src/kernels/jupyter/baseKernelConnectionWrapper.ts +++ b/src/kernels/jupyter/baseKernelConnectionWrapper.ts @@ -79,7 +79,7 @@ export abstract class BaseKernelConnectionWrapper implements Kernel.IKernelConne return (this.possibleKernelConnection || this._previousKernelConnection).name; } public get isDisposed(): boolean { - return this.possibleKernelConnection?.isDisposed === true; + return this.possibleKernelConnection ? this.possibleKernelConnection?.isDisposed === true : true; } public get model(): Kernel.IModel { diff --git a/src/test/common.ts b/src/test/common.ts index 6c4e0df3a75..6ad2b82f2dd 100644 --- a/src/test/common.ts +++ b/src/test/common.ts @@ -93,7 +93,7 @@ export async function waitForCondition( * assert.equal(handler.first, 'Args Passed to first onDidSave') * assert.equal(handler.count, 1)// Only one should have been fired. */ - export class TestEventHandler implements IDisposable { +export class TestEventHandler implements IDisposable { public get fired() { return this.handledEvents.length > 0; } @@ -154,7 +154,6 @@ export async function waitForCondition( } } - export function createEventHandler( obj: T, eventName: K, @@ -163,4 +162,3 @@ export function createEventHandler( // eslint-disable-next-line @typescript-eslint/no-explicit-any return new TestEventHandler(obj[eventName] as any, eventName as string, disposables) as any; } -