Commit 7fcc5c00 authored by Chunchi Che's avatar Chunchi Che

Merge branch 'fix/reload' into 'main'

fix reload

See merge request !149
parents 0eb554ec 9549cfbe
Pipeline #21005 failed with stages
in 19 minutes and 53 seconds
...@@ -72,7 +72,7 @@ export const updateFieldDataImpl: DuelReducer<MsgUpdateData> = ( ...@@ -72,7 +72,7 @@ export const updateFieldDataImpl: DuelReducer<MsgUpdateData> = (
const zone = action.payload.zone; const zone = action.payload.zone;
const actions = action.payload.actions; const actions = action.payload.actions;
if (player && zone && actions) { if (player !== undefined && zone !== undefined && actions !== undefined) {
switch (zone) { switch (zone) {
case ygopro.CardZone.HAND: { case ygopro.CardZone.HAND: {
const hand = judgeSelf(player, state) ? state.meHands : state.opHands; const hand = judgeSelf(player, state) ? state.meHands : state.opHands;
......
...@@ -15,10 +15,10 @@ export function judgeSelf(player: number, state: Draft<DuelState>): boolean { ...@@ -15,10 +15,10 @@ export function judgeSelf(player: number, state: Draft<DuelState>): boolean {
const selfType = state.selfType; const selfType = state.selfType;
if (selfType === 1) { if (selfType === 1) {
// 自己是先攻 // 自己是先攻
return player === 0; return player == 0;
} else if (selfType === 2) { } else if (selfType === 2) {
// 自己是后攻 // 自己是后攻
return player === 1; return player == 1;
} else { } else {
// currently never reach // currently never reach
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment