Skip to content

Error thrown if element not visible anymore #197

@ligoo

Description

@ligoo

In the situation of the shepherd box is hidden (per example because some modal showed up and removed the tutorial box) the following error will occur:

Uncaught TypeError: Cannot set property 'hidden' of undefined at Step.hide (shepherd.js:480)

You should wrap these 2 setters by an undefined check before. This should look like this (shepherd.js line 480):

if(typeof this.el !== 'undefined') { // prevent exception if this.el is not available
  this.el.hidden = true; // We need to manually set styles for < IE11 support

  this.el.style.display = 'none';
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions