Skip to content

Commit

Permalink
Merge pull request #190 from shipshapecode/pr-181
Browse files Browse the repository at this point in the history
Attempting to fix uncaught exception caused by non-existing element f…
  • Loading branch information
RobbieTheWagner authored Jul 2, 2018
2 parents 30fd1a5 + 0aef930 commit fb444ef
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
6 changes: 4 additions & 2 deletions dist/css/shepherd-theme-arrows-plain-buttons.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
padding: 1em;
font-size: 1.1em;
line-height: 1.5em;
transform: translateZ(0);
filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2)); }
-webkit-transform: translateZ(0);
transform: translateZ(0);
-webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2)); }
.shepherd-theme-arrows-plain-buttons .popper__arrow {
content: "";
display: block;
Expand Down
4 changes: 3 additions & 1 deletion dist/js/shepherd.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,9 @@ function (_Evented) {
if (typeof opts.element === 'string') {
// Can't override the element in user opts reference because we can't
// guarantee that the element will exist in the future.
returnOpts.element = document.querySelector(opts.element);
try {
returnOpts.element = document.querySelector(opts.element);
} catch (e) {}

if (!returnOpts.element) {
console.error("The element for this Shepherd step was not found ".concat(opts.element));
Expand Down
Loading

0 comments on commit fb444ef

Please sign in to comment.