Skip to content

Commit

Permalink
Editor: Workaround for Storage not being ready in time.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jun 3, 2016
1 parent 3773c76 commit a95797a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editor/js/Storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit a95797a

Please sign in to comment.