Browse Source

Editor: Workaround for Storage not being ready in time.

Mr.doob 9 years ago
parent
commit
8e7f1067fd
1 changed files with 2 additions and 0 deletions
  1. 2 0
      editor/js/Storage.js

+ 2 - 0
editor/js/Storage.js

@@ -80,6 +80,8 @@ var Storage = function () {
 
 		clear: function () {
 
+			if ( database === undefined ) return;
+
 			var transaction = database.transaction( [ 'states' ], 'readwrite' );
 			var objectStore = transaction.objectStore( 'states' );
 			var request = objectStore.clear();