Browse Source

Compact try catch

pull/1272/head
Sam Wray 7 years ago
parent
commit
46129ac0c8
No known key found for this signature in database
GPG Key ID: 41B2E053F1C62E98
  1. 10
      Sortable.js
  2. 2
      Sortable.min.js

10
Sortable.js

@ -1431,18 +1431,14 @@
function _matches(/**HTMLElement*/el, /**String*/selector) {
if (el) {
if (el.matches) {
try {
if (el.matches) {
return el.matches(selector);
} catch(e) {
return false;
}
} else if (el.msMatchesSelector) {
try {
return el.msMatchesSelector(selector);
} catch(e) {
return false;
}
} catch(_) {
return false;
}
}

2
Sortable.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save