提交 88278792 编写于 作者: G Gabriele Cirulli

small change in scoremanager

上级 a862d448
...@@ -19,11 +19,7 @@ function LocalScoreManager() { ...@@ -19,11 +19,7 @@ function LocalScoreManager() {
} }
LocalScoreManager.prototype.get = function () { LocalScoreManager.prototype.get = function () {
var score = this.storage.getItem(this.key); return this.storage.getItem(this.key) || 0;
if (typeof score === "undefined" || score === null) {
score = 0;
}
return score;
}; };
LocalScoreManager.prototype.set = function (score) { LocalScoreManager.prototype.set = function (score) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册