Skip to content

Commit

Permalink
shared.js:dedupe: Check if kept element is still in DOM
Browse files Browse the repository at this point in the history
  • Loading branch information
jnvsor committed May 3, 2019
1 parent c9faaf5 commit c332db9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Binary file modified build/kint.phar
Binary file not shown.
2 changes: 1 addition & 1 deletion resources/compiled/shared.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion resources/js/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if (typeof window.kintShared === 'undefined') {
var kintShared = {
dedupe: function(selector, keep) {
[].forEach.call(document.querySelectorAll(selector), function(elem) {
if (!keep) {
if (!keep || !keep.ownerDocument.contains(keep)) {
keep = elem;
}

Expand Down

0 comments on commit c332db9

Please sign in to comment.