Skip to content

Commit

Permalink
[Fix] properly recognize document.all in Safari 4
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Sep 12, 2022
1 parent 0fa0169 commit 3193735
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -51,7 +51,7 @@ var isDDA = typeof document === 'object' ? function isDocumentDotAll(value) {
// in IE 8, typeof document.all is "object"
if (typeof value === 'undefined' || typeof value === 'object') {
try {
return value('') === null;
return value('') == null; // eslint-disable-line eqeqeq
} catch (e) { /**/ }
}
return false;
Expand Down
4 changes: 2 additions & 2 deletions test/index.js
Expand Up @@ -179,9 +179,9 @@ test('DOM', function (t) {
var constructor = global[name];

t.test(name, { skip: !constructor }, function (st) {
st.match(typeof constructor, /^(?:function|object)$/, name + ' is a function');
st.match(typeof constructor, /^(?:function|object)$/, name + ' is a function or object');

st.equal(isCallable(constructor), !isIE68, name + ' is ' + (isIE68 ? 'not ' : '') + 'callable');
st.equal(isCallable(constructor), typeof constructor === 'function', name + ' is ' + (isIE68 ? 'not ' : '') + 'callable');

st.end();
});
Expand Down

0 comments on commit 3193735

Please sign in to comment.