提交 79af30b1 编写于 作者: M Mugen87

FileLoader: Remove redundant code

上级 cd97b90d
......@@ -176,23 +176,12 @@ Object.assign( FileLoader.prototype, {
delete loading[ url ];
if ( this.status === 200 ) {
for ( var i = 0, il = callbacks.length; i < il; i ++ ) {
var callback = callbacks[ i ];
if ( callback.onLoad ) callback.onLoad( response );
}
scope.manager.itemEnd( url );
} else if ( this.status === 0 ) {
if ( this.status === 200 || this.status === 0 ) {
// Some browsers return HTTP Status 0 when using non-http protocol
// e.g. 'file://' or 'data://'. Handle as success.
console.warn( 'THREE.FileLoader: HTTP Status 0 received.' );
if ( this.status === 0 ) console.warn( 'THREE.FileLoader: HTTP Status 0 received.' );
for ( var i = 0, il = callbacks.length; i < il; i ++ ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册