From d547e0b80bc98893993ece2ff4058e18f5ac6914 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Wed, 6 Mar 2019 12:49:23 -0330 Subject: [PATCH] Only call onRecipient and onSender methods if defined in sender-to-recipient (#6247) --- .../sender-to-recipient/sender-to-recipient.component.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/app/components/sender-to-recipient/sender-to-recipient.component.js b/ui/app/components/sender-to-recipient/sender-to-recipient.component.js index 65102a7ad..7d3436dc3 100644 --- a/ui/app/components/sender-to-recipient/sender-to-recipient.component.js +++ b/ui/app/components/sender-to-recipient/sender-to-recipient.component.js @@ -97,7 +97,9 @@ export default class SenderToRecipient extends PureComponent { onClick={() => { this.setState({ recipientAddressCopied: true }) copyToClipboard(checksummedRecipientAddress) - onRecipientClick() + if (onRecipientClick) { + onRecipientClick() + } }} > { this.renderRecipientIdenticon() } @@ -164,7 +166,9 @@ export default class SenderToRecipient extends PureComponent { onClick={() => { this.setState({ senderAddressCopied: true }) copyToClipboard(checksummedSenderAddress) - onSenderClick() + if (onSenderClick) { + onSenderClick() + } }} > { this.renderSenderIdenticon() }