From 98e5b32cf48a9f5d04ea716add4703df2a00878d Mon Sep 17 00:00:00 2001 From: jkodu Date: Thu, 2 May 2019 08:53:26 +0100 Subject: [PATCH] check if property exists in cache --- 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 );