Move storeGridWeapon to after conflict deletion
Otherwise, we delete what we just stored
This commit is contained in:
parent
44c0e96474
commit
fa6b312f06
1 changed files with 3 additions and 3 deletions
|
|
@ -183,9 +183,6 @@ const WeaponGrid = (props: Props) => {
|
|||
position: position,
|
||||
})
|
||||
.then((response) => {
|
||||
// Store new character in state
|
||||
storeGridWeapon(response.data)
|
||||
|
||||
// Remove conflicting characters from state
|
||||
conflicts.forEach((c) => {
|
||||
if (appState.grid.weapons.mainWeapon?.object.id === c.id) {
|
||||
|
|
@ -196,6 +193,9 @@ const WeaponGrid = (props: Props) => {
|
|||
}
|
||||
})
|
||||
|
||||
// Store new character in state
|
||||
storeGridWeapon(response.data.grid_weapon)
|
||||
|
||||
// Reset conflict
|
||||
resetConflict()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue