From b71b5ec5d0561737fc0aa0cce7ab397d122e9280 Mon Sep 17 00:00:00 2001 From: matthias Date: Mon, 14 Oct 2024 17:56:15 +0200 Subject: [PATCH 1/2] Fixed props key was spread into JSX --- src/Hyperlink.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Hyperlink.tsx b/src/Hyperlink.tsx index 891a97e..f1d93c8 100644 --- a/src/Hyperlink.tsx +++ b/src/Hyperlink.tsx @@ -72,11 +72,9 @@ class Hyperlink extends Component { let elements = []; let _lastIndex = 0; - const componentProps = { - ...component.props, - ref: undefined, - key: undefined, - }; + const componentProps = {...component.props}; + delete componentProps.key; + delete componentProps.ref; try { this.state.linkifyIt From ebe207b29f188ce4b9df568660e00997fcd2df8a Mon Sep 17 00:00:00 2001 From: matthias Date: Tue, 15 Oct 2024 10:22:45 +0200 Subject: [PATCH 2/2] fix: props key was spread into JSX --- src/Hyperlink.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Hyperlink.tsx b/src/Hyperlink.tsx index f1d93c8..401406f 100644 --- a/src/Hyperlink.tsx +++ b/src/Hyperlink.tsx @@ -72,7 +72,9 @@ class Hyperlink extends Component { let elements = []; let _lastIndex = 0; - const componentProps = {...component.props}; + const componentProps = { + ...component.props, + }; delete componentProps.key; delete componentProps.ref; @@ -135,9 +137,9 @@ class Hyperlink extends Component { const componentProps = { ...component.props, - ref: undefined, - key: undefined, }; + delete componentProps.key; + delete componentProps.ref; return React.cloneElement( component,