mirror of
https://github.com/kamranahmedse/driver.js.git
synced 2026-11-02 22:17:14 +08:00
Fix - Error on hide when popover is not shown
This commit is contained in:
+1
-1
@@ -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",
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
|
||||
@@ -145,7 +145,6 @@ export default class Driver {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handler for the onResize DOM event
|
||||
* Makes sure highlighted element stays at valid position
|
||||
|
||||
Reference in New Issue
Block a user