diff --git a/index.js b/index.js index e758666..aa47f30 100644 --- a/index.js +++ b/index.js @@ -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; diff --git a/test/index.js b/test/index.js index 1061af7..5ae4890 100644 --- a/test/index.js +++ b/test/index.js @@ -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(); });