提交 749d8471 编写于 作者: M Mr.doob

Editor: Show alert() when json fails to parse.

上级 ac7cc20b
......@@ -258,7 +258,15 @@
// 3.0
var data = JSON.parse( contents );
try {
var data = JSON.parse( contents );
} catch ( error ) {
return alert( error );
}
if ( data.metadata === undefined ) { // 2.0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册