From 1d3978ce2f92c642d71fe1d034da229faa02ab46 Mon Sep 17 00:00:00 2001 From: Mathieu <70369997+MathieuRA@users.noreply.github.com> Date: Mon, 30 Nov 2020 11:20:28 +0100 Subject: [PATCH] fix(xo-web/host): unsubscribe missing patches when the props change (#5370) --- packages/xo-web/src/xo-app/host/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/xo-web/src/xo-app/host/index.js b/packages/xo-web/src/xo-app/host/index.js index 30a3f68b2..2783c80ef 100644 --- a/packages/xo-web/src/xo-app/host/index.js +++ b/packages/xo-web/src/xo-app/host/index.js @@ -191,6 +191,10 @@ export default class Host extends Component { return } + if (this.unsubscribeHostMissingPatches !== undefined) { + this.unsubscribeHostMissingPatches() + } + this.unsubscribeHostMissingPatches = subscribeHostMissingPatches(host, missingPatches => this.setState({ missingPatches: missingPatches && sortBy(missingPatches, patch => -patch.time),