From 51c2e19e874be6a7a203cb77829ac9b29dbf1946 Mon Sep 17 00:00:00 2001 From: Jey Date: Thu, 9 May 2019 16:22:29 +0100 Subject: [PATCH] fix: check if property exists in cache of flattenedTree (#1536) --- lib/core/utils/flattened-tree.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/utils/flattened-tree.js b/lib/core/utils/flattened-tree.js index 5012acb2d3..68dad0f270 100644 --- a/lib/core/utils/flattened-tree.js +++ b/lib/core/utils/flattened-tree.js @@ -34,13 +34,13 @@ function virtualDOMfromNode(node, shadowId) { actualNode: node, _isHidden: null, // will be populated by axe.utils.isHidden get isFocusable() { - if (!vNodeCache._isFocusable) { + if (!vNodeCache.hasOwnProperty('_isFocusable')) { vNodeCache._isFocusable = axe.commons.dom.isFocusable(node); } return vNodeCache._isFocusable; }, get tabbableElements() { - if (!vNodeCache._tabbableElements) { + if (!vNodeCache.hasOwnProperty('_tabbableElements')) { vNodeCache._tabbableElements = axe.commons.dom.getTabbableElements( this );