From 8b27794cc715cc6e1ea6110ef1bb7be75405de09 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Tue, 13 Jul 2021 17:00:59 -0700 Subject: [PATCH] Fix crash when passing invalid attrs to declare --- lib/session.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/session.ts b/lib/session.ts index bfa8313..7dbc8b8 100644 --- a/lib/session.ts +++ b/lib/session.ts @@ -2290,7 +2290,7 @@ function processDeclarations( syncState.refreshAttributes.object.add(currentPath); else if (currentAttributes.object[1] === 0) syncState.refreshAttributes.value.add(currentPath); - } else { + } else if (attrName in syncState.refreshAttributes) { syncState.refreshAttributes[attrName].add(currentPath); } }