Browse Source

JavaScript/es4x read randomNumber from row (#4776)

Nate 6 years ago
parent
commit
137ab2a331
1 changed files with 2 additions and 1 deletions
  1. 2 1
      frameworks/JavaScript/es4x/index.js

+ 2 - 1
frameworks/JavaScript/es4x/index.js

@@ -187,7 +187,8 @@ app.route("/updates").handler(ctx => {
 
 
         const row = ar.result().iterator().next();
         const row = ar.result().iterator().next();
 
 
-        worlds[index] = {id: row.getInteger(0), randomNumber: util.randomWorld()};
+        worlds[index] = {id: row.getInteger(0), randomNumber: row.getInteger(1)};
+        worlds[index].randomNumber = util.randomWorld();
         if (++queryCount === queries) {
         if (++queryCount === queries) {
           worlds.sort((a, b) => {
           worlds.sort((a, b) => {
             return a.id - b.id;
             return a.id - b.id;