From fc15b189c6c3e022b8801116193b943acfdf92a3 Mon Sep 17 00:00:00 2001 From: Oscar Bazaldua <511911+oscb@users.noreply.github.com> Date: Wed, 10 Apr 2024 16:02:41 -0700 Subject: [PATCH] fix: handle reseting apiHost to null --- packages/core/lib/plugins/segment_destination.dart | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/core/lib/plugins/segment_destination.dart b/packages/core/lib/plugins/segment_destination.dart index f01d60c..0970bfc 100644 --- a/packages/core/lib/plugins/segment_destination.dart +++ b/packages/core/lib/plugins/segment_destination.dart @@ -69,10 +69,7 @@ class SegmentDestination extends DestinationPlugin with Flushable { @override void update(Map settings, ContextUpdateType type) { super.update(settings, type); - if (settings[segmentDestinationKey] != null && - settings[segmentDestinationKey]['apiHost'] != null) { - _apiHost = '${settings[segmentDestinationKey]['apiHost']}'; - } + _apiHost = settings[segmentDestinationKey]?['apiHost']; } @override