Fix null ref exception

This commit is contained in:
Sven Geusens
2024-09-13 15:24:01 +02:00
parent de0d5efa06
commit 8265a923a7

View File

@@ -48,7 +48,7 @@ function contextItemData(contextInstance: any): UmbDebugContextItemData {
case 'object':
// Check if the object is an observable (by checking if it has a subscribe method/function)
const isSubscribeLike = 'subscribe' in value && typeof value['subscribe'] === 'function';
const isSubscribeLike = value && 'subscribe' in value && typeof value['subscribe'] === 'function';
const isWebComponent = value instanceof HTMLElement;
let valueToDisplay = 'Complex Object';