Skip to content

Commit 03d65e3

Browse files
Fix: Streamdown memo comparison function doesn't check for changes to the allowedTags prop, causing the component to skip re-renders when allowedTags changes
Co-authored-by: haydenbleasel <hello@haydenbleasel.com>
1 parent d248d43 commit 03d65e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/streamdown/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ export const Streamdown = memo(
445445
prevProps.mode === nextProps.mode &&
446446
prevProps.plugins === nextProps.plugins &&
447447
prevProps.className === nextProps.className &&
448-
prevProps.linkSafety === nextProps.linkSafety
448+
prevProps.linkSafety === nextProps.linkSafety &&
449+
prevProps.allowedTags === nextProps.allowedTags
449450
);
450451
Streamdown.displayName = "Streamdown";

0 commit comments

Comments
 (0)