From 65c4a443cd58a8662acb43fc47424d08ddc2f0ea Mon Sep 17 00:00:00 2001 From: Palmer Mebane Date: Wed, 8 Nov 2017 11:05:07 -0800 Subject: [PATCH] Fix lifecycle ordering bug removing recently added container --- src/GatewayRegistry.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/GatewayRegistry.js b/src/GatewayRegistry.js index 8ef72a9..1be9bd0 100644 --- a/src/GatewayRegistry.js +++ b/src/GatewayRegistry.js @@ -22,8 +22,10 @@ export default class GatewayRegistry { this._renderContainer(name); } - removeContainer(name) { - this._containers[name] = null; + removeContainer(name, container) { + if (this._containers[name] === container) { + this._containers[name] = null; + } } addChild(name, gatewayId, child) {