提交 9c775371 编写于 作者: K Kamran Ahmed

Fix - Error on hide when popover is not shown

上级 3cc1d57a
{ {
"name": "driver.js", "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", "description": "A light-weight, no-dependency, vanilla JavaScript library to drive the user's focus across the page",
"main": "dist/driver.min.js", "main": "dist/driver.min.js",
"types": "types/index.d.ts", "types": "types/index.d.ts",
......
...@@ -91,6 +91,11 @@ export default class Popover extends Element { ...@@ -91,6 +91,11 @@ export default class Popover extends Element {
* @public * @public
*/ */
hide() { hide() {
// If hide is called when the node isn't created yet
if (!this.node) {
return;
}
this.node.style.display = 'none'; this.node.style.display = 'none';
} }
......
...@@ -145,7 +145,6 @@ export default class Driver { ...@@ -145,7 +145,6 @@ export default class Driver {
} }
} }
/** /**
* Handler for the onResize DOM event * Handler for the onResize DOM event
* Makes sure highlighted element stays at valid position * Makes sure highlighted element stays at valid position
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册