Skip to content

Commit

Permalink
fix(ui): recall LoRAs may create duplicates
Browse files Browse the repository at this point in the history
Closes #7004
  • Loading branch information
psychedelicious authored and hipsterusername committed Oct 3, 2024
1 parent 1010c98 commit 80d7d69
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const lorasSlice = createSlice({
},
loraRecalled: (state, action: PayloadAction<{ lora: LoRA }>) => {
const { lora } = action.payload;
state.loras = state.loras.filter((l) => l.model.key !== lora.model.key && l.id !== lora.id);
state.loras.push(lora);
},
loraDeleted: (state, action: PayloadAction<{ id: string }>) => {
Expand Down

0 comments on commit 80d7d69

Please sign in to comment.