Fix - Error on hide when popover is not shown

This commit is contained in:
Kamran Ahmed
2019-03-04 10:17:44 +04:00
parent 3cc1d57ae5
commit 9c7753715b
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "driver.js",
"version": "0.9.3",
"version": "0.9.4",
"description": "A light-weight, no-dependency, vanilla JavaScript library to drive the user's focus across the page",
"main": "dist/driver.min.js",
"types": "types/index.d.ts",
+5
View File
@@ -91,6 +91,11 @@ export default class Popover extends Element {
* @public
*/
hide() {
// If hide is called when the node isn't created yet
if (!this.node) {
return;
}
this.node.style.display = 'none';
}
-1
View File
@@ -145,7 +145,6 @@ export default class Driver {
}
}
/**
* Handler for the onResize DOM event
* Makes sure highlighted element stays at valid position