From 34ae81c30d596a874a8618e027b55224e3df6c8d Mon Sep 17 00:00:00 2001 From: lilia Date: Fri, 15 Jan 2016 01:22:07 -0800 Subject: [PATCH] Redo previous migration This time, wait for storage to be ready. Fixes #608 // FREEBIE --- js/database.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/database.js b/js/database.js index cd6c9873..5f8c364b 100644 --- a/js/database.js +++ b/js/database.js @@ -88,6 +88,18 @@ storage.put("chromiumRegistrationDoneEver", ""); } } + }, + { + version: "6.0", + migrate: function(transaction, next) { + storage.onready(function() { + if (storage.get("chromiumRegistrationDone") === "") { + storage.put("chromiumRegistrationDoneEver", ""); + next(); + } + }); + storage.fetch(); + } } ]; }());