Skip to content

Commit

Permalink
fix: check if property exists in cache of flattenedTree (#1536)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeeyyy committed May 9, 2019
1 parent 727323c commit 51c2e19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/core/utils/flattened-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down

0 comments on commit 51c2e19

Please sign in to comment.