Skip to content

Commit

Permalink
fix: message history limit not applying (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
vyneer authored Nov 26, 2023
1 parent 16a0d6e commit f6c10c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/chat/js/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ChatInputHistory {
this.history.push(message);
// limit entries
if (this.history.length > this.maxentries)
this.history.slice(-this.maxentries);
this.history.splice(0, this.history.length - this.maxentries);
ChatStore.write('chat.history', this.history);
}
}
Expand Down

0 comments on commit f6c10c3

Please sign in to comment.