From 98ec0194a71fc0fd4a343a73a9a85d1f08f366a2 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Tue, 12 Jan 2021 21:32:14 -0600 Subject: [PATCH] Do not attempt to reconnect to cloud when username is changed to empty string --- src/lib/cloud-manager-hoc.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/cloud-manager-hoc.jsx b/src/lib/cloud-manager-hoc.jsx index 2a3cde1bc..cf4f949fe 100644 --- a/src/lib/cloud-manager-hoc.jsx +++ b/src/lib/cloud-manager-hoc.jsx @@ -55,7 +55,9 @@ const cloudManagerHOC = function (WrappedComponent) { // tw: handle cases where we should explicitly close and reconnect() in the same update if (this.shouldReconnect(this.props, prevProps)) { this.disconnectFromCloud(); - this.connectToCloud(); + if (this.shouldConnect(this.props)) { + this.connectToCloud(); + } return; }