From 330815243950957d23bbacb59473c40cc3d39ad4 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 23 Feb 2020 14:07:50 +0000 Subject: [PATCH] Fix a couple of React warnings/errors Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/structures/ContextMenu.js | 2 +- src/components/views/rooms/MessageComposer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/structures/ContextMenu.js b/src/components/structures/ContextMenu.js index b4b1b80163..898991f4f2 100644 --- a/src/components/structures/ContextMenu.js +++ b/src/components/structures/ContextMenu.js @@ -255,7 +255,7 @@ export class ContextMenu extends React.Component { if (chevronFace === 'top' || chevronFace === 'bottom') { chevronOffset.left = props.chevronOffset; - } else { + } else if (position.top !== undefined) { const target = position.top; // By default, no adjustment is made diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index 53e10fa750..557a58412a 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -341,7 +341,7 @@ export default class MessageComposer extends React.Component { ) : ''; - controls.push(