From 5cb4c26f6173cb5695e73af56c7e01cbf4901a04 Mon Sep 17 00:00:00 2001 From: acethecreator Date: Wed, 20 Sep 2023 13:23:34 +0100 Subject: [PATCH] fixing linting error --- library/src/containers/Messages/Message.tsx | 4 ++-- library/src/containers/Operations/Operation.tsx | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/library/src/containers/Messages/Message.tsx b/library/src/containers/Messages/Message.tsx index 99e19175a..05bf6fff2 100644 --- a/library/src/containers/Messages/Message.tsx +++ b/library/src/containers/Messages/Message.tsx @@ -54,8 +54,8 @@ export const Message: React.FunctionComponent = ({ const xParserMessageName = message.json()['x-parser-message-name']; if ( !messageId || - Number(messageId) == index || - (Number(messageId) == 0 && xParserMessageName) + Number(messageId) === index || + (Number(messageId) === 0 && xParserMessageName) ) { messageId = xParserMessageName; } diff --git a/library/src/containers/Operations/Operation.tsx b/library/src/containers/Operations/Operation.tsx index 5b6e83ba6..a75a7e52f 100644 --- a/library/src/containers/Operations/Operation.tsx +++ b/library/src/containers/Operations/Operation.tsx @@ -281,11 +281,14 @@ export const OperationReplyInfo: React.FunctionComponent = props => { const { type = PayloadType.SEND, operation } = props; const config = useConfig(); const [showMessages, setShowMessages] = useState(false); - if (type !== PayloadType.REPLY && type !== PayloadType.REQUEST) return <>; + if (type !== PayloadType.REPLY && type !== PayloadType.REQUEST) { + return <>; + } const reply = operation.reply(); - if (reply === undefined) return <>; + if (reply === undefined) { + return <>; + } const { typeLabel } = getTypeInformation({ type, config }); - console.log(typeLabel); const replyMessages = reply.messages(); const explicitChannel = reply.channel(); @@ -371,9 +374,13 @@ export const OperationReplyAddressInfo: React.FunctionComponent = ({ operation, }) => { const config = useConfig(); - if (type !== PayloadType.REPLY && type !== PayloadType.REQUEST) return <>; + if (type !== PayloadType.REPLY && type !== PayloadType.REQUEST) { + return <>; + } const reply = operation.reply(); - if (reply === undefined || !reply.hasAddress()) return <>; + if (reply === undefined || !reply.hasAddress()) { + return <>; + } const { typeLabel } = getTypeInformation({ type, config }); const replyAddress = reply.address()!; const replyAddressLocation = replyAddress.location();