From fdda74be6720db15eccdcaca69fe48c401377751 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Wed, 6 Mar 2019 10:58:10 -0330 Subject: [PATCH] Only call onRecipient and onSender methods if defined in sender-to-recipient --- .../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 65102a7ad177..7d3436dc3a3d 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() }