提交 4707039a 编写于 作者: M Mr.doob

Merge branch 'master' into dev

......@@ -193,6 +193,8 @@
editor.storage.get( function ( state ) {
if ( isLoadingFromHash ) return;
if ( state !== undefined ) {
editor.fromJSON( state );
......@@ -324,6 +326,7 @@
//
var isLoadingFromHash = false;
var hash = window.location.hash;
if ( hash.substr( 1, 5 ) === 'file=' ) {
......@@ -336,13 +339,13 @@
loader.crossOrigin = '';
loader.load( file, function ( text ) {
var json = JSON.parse( text );
editor.clear();
editor.fromJSON( json );
editor.fromJSON( JSON.parse( text ) );
} );
isLoadingFromHash = true;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册