From 70cb2df8c1184c887bd512c887f349393e4141f4 Mon Sep 17 00:00:00 2001 From: David Anitoiu Date: Sun, 9 Aug 2020 01:55:31 +0200 Subject: [PATCH] Added null-check to onDeleteKey --- src/container/actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/container/actions.ts b/src/container/actions.ts index abb496d0..f77e3601 100644 --- a/src/container/actions.ts +++ b/src/container/actions.ts @@ -180,7 +180,7 @@ export const onNodeMouseLeave: IStateCallback = ({ nodeId }) } export const onDeleteKey: IStateCallback = ({ config }: IConfig) => (chart: IChart) => { - if (config.readonly) { + if (config && config.readonly) { return chart } if (chart.selected.type === 'node' && chart.selected.id) {