1
0
mirror of https://github.com/danog/2048.git synced 2024-11-30 04:19:06 +01:00

small change in scoremanager

This commit is contained in:
Gabriele Cirulli 2014-03-12 13:30:50 +01:00
parent a862d44849
commit 88278792be

View File

@ -19,11 +19,7 @@ function LocalScoreManager() {
}
LocalScoreManager.prototype.get = function () {
var score = this.storage.getItem(this.key);
if (typeof score === "undefined" || score === null) {
score = 0;
}
return score;
return this.storage.getItem(this.key) || 0;
};
LocalScoreManager.prototype.set = function (score) {