Commit 5a60cba4 authored by alexpott's avatar alexpott

Issue #1995152 by nick_schuch: Fixed Broken selector.

parent 5559caba
......@@ -177,10 +177,12 @@ Drupal.tour.views.ToggleTourView = Backbone.View.extend({
var $this = $(this);
var itemId = $this.attr('data-id');
var itemClass = $this.attr('data-class');
if ((itemId || itemClass) && $document.find('#' + itemId + ', .' + itemClass).length === 0) {
removals = true;
$this.remove();
if ((itemId && $document.find('#' + itemId).length) ||
(itemClass && $document.find('.' + itemClass).length)){
return;
}
removals = true;
$this.remove();
});
// If there were removals, we'll have to do some clean-up.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment