boardgameio / boardgame.io

State Management and Multiplayer Networking for Turn-Based Games
https://boardgame.io
MIT License
10.03k stars 709 forks source link

incorrect isMultiplayer prop #170

Closed attilapolgar closed 6 years ago

attilapolgar commented 6 years ago

When I use a config object for multiplayer: const App = Client({ ...options, multiplayer: { server: 'localhost:8000' } } then in my board component the isMultiplayer prop is false.

But if I create the Client like this: const App = Client({ ...options, multiplayer: true }) then the isMultiplayer prop is true like should be.

I checked the source code and there is strict equality in the related lines: isMultiplayer: multiplayer === true

What am I missing here?

nicolodavis commented 6 years ago

That line is just out of date. I'll fix it (or happy to look at a PR if you want to send me one).

nicolodavis commented 6 years ago

Fixed in https://github.com/google/boardgame.io/commit/f76f97e8291b87d236ee9449211d3ea9c4d64c91, which should be available in the next release.