mirror of
https://github.com/MatMoul/quickdial-webext.git
synced 2024-12-23 15:36:12 +00:00
Bug White page on first install
This commit is contained in:
parent
ddd081672f
commit
723724f50b
@ -102,7 +102,7 @@ app.Messages.init = function(){ // Init Messages Listeners
|
|||||||
app.Settings = {}; // Settings helper object
|
app.Settings = {}; // Settings helper object
|
||||||
app.Settings.init = function(callback){ // Load settings and nodes
|
app.Settings.init = function(callback){ // Load settings and nodes
|
||||||
browser.storage.local.get().then(function(data){
|
browser.storage.local.get().then(function(data){
|
||||||
if(Object.keys(data).length == 0) {
|
if(Object.keys(data).length == 0 || ! data.settings) {
|
||||||
data = {
|
data = {
|
||||||
version: 3,
|
version: 3,
|
||||||
settings: {
|
settings: {
|
||||||
@ -239,6 +239,7 @@ app.Settings.update = function(settings, callback){ // Save new settings
|
|||||||
app.Settings.save(callback);
|
app.Settings.save(callback);
|
||||||
};
|
};
|
||||||
app.Settings.save = function(callback){ // Save settings
|
app.Settings.save = function(callback){ // Save settings
|
||||||
|
if(! app.settings) return;
|
||||||
var data = { version: 4 };
|
var data = { version: 4 };
|
||||||
data.settings = app.settings;
|
data.settings = app.settings;
|
||||||
data.node = app.node;
|
data.node = app.node;
|
||||||
|
Loading…
Reference in New Issue
Block a user