[Pkg-javascript-commits] [less.js] 42/50: window.ActiveXObject in IE11: fix boolean casting

Jonas Smedegaard dr at jones.dk
Mon Oct 26 23:22:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag v1.7.1
in repository less.js.

commit 81f949b19a3e4fed896c7fc0d5053bf6c16047a0
Author: Dmitri Pyatkov <dkrnl at yandex.ru>
Date:   Wed Jun 4 16:54:27 2014 +0800

    window.ActiveXObject in IE11: fix boolean casting
    
    in Internet Explorer 11:
    window.ActiveXObject // function ActiveXObject() {[native code]}
    !window.ActiveXObject // *true*
---
 lib/less/browser.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/less/browser.js b/lib/less/browser.js
index fbcf40b..b709885 100644
--- a/lib/less/browser.js
+++ b/lib/less/browser.js
@@ -416,7 +416,7 @@ function pathDiff(url, baseUrl) {
 }
 
 function getXMLHttpRequest() {
-    if (window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject)) {
+    if (window.XMLHttpRequest && (window.location.protocol !== "file:" || !("ActiveXObject" in window))) {
         return new XMLHttpRequest();
     } else {
         try {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git



More information about the Pkg-javascript-commits mailing list