Skip to content

Commit

Permalink
Merge 3bca825 into bd6baf7
Browse files Browse the repository at this point in the history
  • Loading branch information
xudafeng committed Jan 27, 2021
2 parents bd6baf7 + 3bca825 commit d4c2983
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/autoscrollto.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
};

AutoScrollTo.prototype.setCurrentTopSync = function(value) {
if (typeof localStorage !== 'object') {
if (!localStorage || typeof localStorage !== 'object') {
console.log('localStorage is not working');
return;
}
Expand Down Expand Up @@ -105,7 +105,7 @@
};

AutoScrollTo.prototype.getCurrentTopSync = function() {
if (typeof localStorage !== 'object') {
if (!localStorage || typeof localStorage !== 'object') {
console.log('localStorage is not working');
return;
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "autoscrollto",
"version": "1.0.7",
"version": "1.0.8",
"description": "auto scroll util like title",
"keywords": [
"scroll"
Expand All @@ -24,7 +24,7 @@
"macaca-wd": "3",
"mocha": "6",
"nyc": "*",
"startserver": "^1.3.8"
"startserver": "1"
},
"scripts": {
"dev": "startserver -s -p 8000",
Expand Down

0 comments on commit d4c2983

Please sign in to comment.