summaryrefslogtreecommitdiff
path: root/src/web/app/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/app/common')
-rw-r--r--src/web/app/common/scripts/streaming/othello-game.ts2
-rw-r--r--src/web/app/common/views/components/othello.game.vue1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/web/app/common/scripts/streaming/othello-game.ts b/src/web/app/common/scripts/streaming/othello-game.ts
index 51a435541a..cdf46d5d8d 100644
--- a/src/web/app/common/scripts/streaming/othello-game.ts
+++ b/src/web/app/common/scripts/streaming/othello-game.ts
@@ -3,7 +3,7 @@ import Stream from './stream';
export class OthelloGameStream extends Stream {
constructor(me, game) {
super('othello-game', {
- i: me.token,
+ i: me ? me.token : null,
game: game.id
});
}
diff --git a/src/web/app/common/views/components/othello.game.vue b/src/web/app/common/views/components/othello.game.vue
index 907e317ce9..69b2127760 100644
--- a/src/web/app/common/views/components/othello.game.vue
+++ b/src/web/app/common/views/components/othello.game.vue
@@ -56,6 +56,7 @@ export default Vue.extend({
computed: {
iAmPlayer(): boolean {
+ if (!(this as any).os.isSignedIn) return false;
return this.game.user1_id == (this as any).os.i.id || this.game.user2_id == (this as any).os.i.id;
},
myColor(): Color {