Skip to content

Commit bf04c20

Browse files
committed
[refactor] improve data module load function
1 parent 8118e5b commit bf04c20

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

‎package-lock.json‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nightTab",
3-
"version": "5.4.2",
3+
"version": "5.5.0",
44
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
55
"main": "index.js",
66
"scripts":{

‎src/js/data.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,11 @@ var data = (function(){
235235
};
236236

237237
varload=function(){
238-
returnJSON.parse(mod.get(_saveName));
238+
if(mod.get(_saveName)!=null&&mod.get(_saveName)!=undefined){
239+
returnJSON.parse(mod.get(_saveName));
240+
}else{
241+
returnfalse;
242+
};
239243
};
240244

241245
varwipe=function(){

‎src/js/version.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
varversion=(function(){
22

3-
varcurrent="5.4.2";
3+
varcurrent="5.5.0";
44

55
varname="Zonked Tarsier";
66

‎src/manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "nightTab",
33
"short_name": "nightTab",
44
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
5-
"version": "5.4.2",
5+
"version": "5.5.0",
66
"manifest_version": 2,
77
"chrome_url_overrides":{
88
"newtab": "index.html"

0 commit comments

Comments
(0)