focus-lock
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -28,3 +28,3 @@ 'use strict'; | ||
if (!activeElement || activeElement.dataset.focusGuard) { | ||
if (!activeElement || activeElement.dataset && activeElement.dataset.focusGuard) { | ||
return false; | ||
@@ -31,0 +31,0 @@ } |
@@ -100,3 +100,3 @@ 'use strict'; | ||
var notAGuard = function notAGuard(node) { | ||
return !node.dataset.focusGuard; | ||
return !(node.dataset && node.dataset.focusGuard); | ||
}; | ||
@@ -103,0 +103,0 @@ |
{ | ||
"name": "focus-lock", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "DOM trap for a focus", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
137332