Browse Source

JSONLoader: Moved .withCredentials under .open. See #2927.

Mr.doob 12 years ago
parent
commit
46d3c98478
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/loaders/JSONLoader.js

+ 1 - 2
src/loaders/JSONLoader.js

@@ -32,8 +32,6 @@ THREE.JSONLoader.prototype.loadAjaxJSON = function ( context, url, callback, tex
 
 	var length = 0;
 
-	xhr.withCredentials = this.withCredentials;
-
 	xhr.onreadystatechange = function () {
 
 		if ( xhr.readyState === xhr.DONE ) {
@@ -86,6 +84,7 @@ THREE.JSONLoader.prototype.loadAjaxJSON = function ( context, url, callback, tex
 	};
 
 	xhr.open( "GET", url, true );
+	xhr.withCredentials = this.withCredentials;
 	xhr.send( null );
 
 };