File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -299,15 +299,15 @@ function handleTurnChange (turnData) {
299
299
if ( socket . id === previousPlayerId && turnData . gist != null ) {
300
300
console . log ( "User's turn is about to end." ) ;
301
301
302
- // If the current player is about to change ,
303
- if ( currentPlayerId !== previousPlayerId ) {
302
+ // If the current player does NOT own the current Gist ,
303
+ if ( userName !== turnData . gist . owner ) {
304
304
305
305
//console.log("handleTurnChange: now forking and editing gist " + turnData.gist.id);
306
306
307
- // fork and edit the current gist on behalf of previous player and send new ID to server
307
+ // Fork/ edit current Gist on behalf of player whose turn is about to end, and send new ID to server
308
308
forkAndEditGist ( turnData . gist . id , editor . getValue ( ) ) ;
309
309
310
- // Otherwise, JUST EDIT the current gist on behalf of previous player and send new ID to server
310
+ // Otherwise, JUST EDIT the current Gist and send new ID to server
311
311
} else {
312
312
313
313
//console.log("handleTurnChange: now editing gist " + turnData.gist.id);
You can’t perform that action at this time.
0 commit comments