From e2b1d6430c6aa320a72e73823b5fe82604cb6d99 Mon Sep 17 00:00:00 2001 From: kalvens Date: Sat, 13 May 2023 00:08:01 -0500 Subject: [PATCH] fix: error trying to do in on a null value in is ui function call --- src/document/UI.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/document/UI.ts b/src/document/UI.ts index 4b60e04f..71008d46 100644 --- a/src/document/UI.ts +++ b/src/document/UI.ts @@ -19,9 +19,9 @@ export type UIValueString = String & {[UIValue]: true} export type UISelectionStart = Number & {[UISelection]: true} export function isUIValue( - value: string | UIValueString, + value: string | UIValueString | null, ): value is UIValueString { - return typeof value === 'object' && UIValue in value + return typeof value === 'object' && value !== null && UIValue in value } export function isUISelectionStart(