提交 ef5d4085 编写于 作者: D Don McCurdy

[glTF] Ignore onError if handler not provided.

上级 beb8834e
......@@ -38,8 +38,12 @@ THREE.GLTFLoader = ( function () {
} catch ( e ) {
// For SyntaxError or TypeError, return a generic failure message.
onError( e.constructor === Error ? e : new Error( 'THREE.GLTFLoader: Unable to parse model.' ) );
if ( onError !== undefined ) {
// For SyntaxError or TypeError, return a generic failure message.
onError( e.constructor === Error ? e : new Error( 'THREE.GLTFLoader: Unable to parse model.' ) );
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册