From 0e4ba958270443a20dadcc5fa5ec1e06b0da2f3a Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Fri, 19 Apr 2024 10:43:16 -0400 Subject: [PATCH] update banned routes list in more cases --- lib/components/form/call-taker/advanced-options.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/components/form/call-taker/advanced-options.js b/lib/components/form/call-taker/advanced-options.js index 07de56404..de97254ce 100644 --- a/lib/components/form/call-taker/advanced-options.js +++ b/lib/components/form/call-taker/advanced-options.js @@ -83,8 +83,8 @@ class AdvancedOptions extends Component { componentDidUpdate(prevProps) { const { routes } = this.props // Once routes are available, map them to the route options format. - if (!isEmpty(routes) && isEmpty(prevProps.routes)) { - const routeOptions = Object.values(routes).map(this.routeToOption) + const routeOptions = Object.values(routes).map(this.routeToOption) + if (routeOptions.length !== this.state.routeOptions.length) { this.setState({ routeOptions }) } }