Explorar o código

Editor: Workaround for Storage not being ready in time.

Mr.doob %!s(int64=9) %!d(string=hai) anos
pai
achega
8e7f1067fd
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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();