diff --git a/editor/index.html b/editor/index.html
index 1057d880a04de81c6fef75c73bc99eb7fbeb0068..2409f9021ea9813c7c43fccbc607e4e9307ae6c9 100644
--- a/editor/index.html
+++ b/editor/index.html
@@ -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;
+
}
}