Corrected tutorial

This commit is contained in:
Thomas FORGIONE
2015-07-22 17:01:36 +02:00
parent b9ec13bd6d
commit 4e1d86ca8b
3 changed files with 33 additions and 9 deletions

View File

@@ -220,7 +220,9 @@ L3D.generateCoins = function(totalCoins, coin_ids) {
if (coin_ids === undefined)
L3D.shuffle(totalCoins);
else {
else if (coin_ids === null) {
return [];
} else {
for (i = 0; i < coin_ids.length; i++) {
@@ -250,8 +252,6 @@ L3D.generateCoins = function(totalCoins, coin_ids) {
indices.push(totalCoins[i].id);
}
console.log(bound);
if (coin_ids === undefined || (coin_ids instanceof Array && coin_ids.length === 0))
L3D.DB.Private.sendData('/posts/coin-id', {indices : indices});