Skip to content

Commit

Permalink
Only hide a removed step if the step is open (bugfix)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrheault committed Sep 21, 2016
1 parent ecc8462 commit f173abb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tether-shepherd",
"version": "1.8.0",
"version": "1.8.1",
"description": "Guide your users through a tour of your app.",
"authors": [
"Adam Schwartz <adam.flynn.schwartz@gmail.com>",
Expand Down
4 changes: 3 additions & 1 deletion src/js/shepherd.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,9 @@ class Tour extends Evented {
for (let i = 0; i < this.steps.length; ++i) {
const step = this.steps[i];
if (step.id === name) {
step.hide();
if (step.isOpen()) {
step.hide();
}
step.destroy();
this.steps.splice(i, 1);
break;
Expand Down

0 comments on commit f173abb

Please sign in to comment.