donejs / bitballs

A basketball tourney application.
https://donejs.com/bitballs.html
MIT License
11 stars 17 forks source link

Promises are different in the client and the server #245

Open justinbmeyer opened 8 years ago

justinbmeyer commented 8 years ago

If you change tournamentPromise of components/tournament/details/details.js to:

        tournamentPromise: {
            get: function(){
                var p = Tournament.get({id: this.attr("tournamentId")});
                console.log("state",typeof p.state);
                return p;
            }
        },

You'll see that on the server, state function, on the client state undefined.

There's different promise implementations being used and could be a source of bugs / confusion. Something to look into.

gKreator commented 7 years ago

Confirmed. I just ran into this issue.