1
0
mirror of https://github.com/MatMoul/quickdial-webext.git synced 2024-12-23 07:26:11 +00:00

Bug White page on first install

This commit is contained in:
MatMoul 2018-10-21 04:36:25 +02:00
parent ddd081672f
commit 723724f50b

View File

@ -102,7 +102,7 @@ app.Messages.init = function(){ // Init Messages Listeners
app.Settings = {}; // Settings helper object
app.Settings.init = function(callback){ // Load settings and nodes
browser.storage.local.get().then(function(data){
if(Object.keys(data).length == 0) {
if(Object.keys(data).length == 0 || ! data.settings) {
data = {
version: 3,
settings: {
@ -239,6 +239,7 @@ app.Settings.update = function(settings, callback){ // Save new settings
app.Settings.save(callback);
};
app.Settings.save = function(callback){ // Save settings
if(! app.settings) return;
var data = { version: 4 };
data.settings = app.settings;
data.node = app.node;