Skip to content

Commit

Permalink
readd updateserver
Browse files Browse the repository at this point in the history
  • Loading branch information
ljankoschek committed Jun 30, 2024
1 parent 3a86da9 commit a35d701
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fe1-web/src/features/lao/reducer/LaoServerReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,8 @@ const serverSlice = createSlice({
}

if (server.address in laoState.byAddress) {
throw Error(
`${server.address} is already part of laoState.byAddress. Use updateServer() instead of addServer()`,
);
updateServer(new Hash(server.laoId), server.address, server);

Check failure on line 63 in fe1-web/src/features/lao/reducer/LaoServerReducer.ts

View workflow job for this annotation

GitHub Actions / Fe1-Web (ubuntu-latest, 18.x)

'updateServer' was used before it was defined
return;
}

laoState.byAddress[server.address] = server;
Expand Down

0 comments on commit a35d701

Please sign in to comment.