mirror of
https://github.com/run-llama/ai-chatbot.git
synced 2026-07-01 21:14:02 -04:00
fix: add condition to messages memoization ruleset (#698)
This commit is contained in:
@@ -75,6 +75,7 @@ export const Messages = memo(PureMessages, (prevProps, nextProps) => {
|
||||
if (prevProps.isLoading !== nextProps.isLoading) return false;
|
||||
if (prevProps.isLoading && nextProps.isLoading) return false;
|
||||
if (prevProps.messages.length !== nextProps.messages.length) return false;
|
||||
if (!equal(prevProps.messages, nextProps.messages)) return false;
|
||||
if (!equal(prevProps.votes, nextProps.votes)) return false;
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user