From 8ca09786fa887ffcbeb741829487de2b1b938b60 Mon Sep 17 00:00:00 2001 From: James Ellis Date: Thu, 17 Aug 2023 10:08:36 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Guard=20against=20initializing?= =?UTF-8?q?=20Appcues=20multiple=20times?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/SegmentAppcues/AppcuesDestination.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/SegmentAppcues/AppcuesDestination.swift b/Sources/SegmentAppcues/AppcuesDestination.swift index df98221..3620f6e 100644 --- a/Sources/SegmentAppcues/AppcuesDestination.swift +++ b/Sources/SegmentAppcues/AppcuesDestination.swift @@ -30,6 +30,8 @@ public class AppcuesDestination: DestinationPlugin { } public func update(settings: Settings, type: UpdateType) { + guard type == .initial else { return } + guard let appcuesSettings: AppcuesSettings = settings.integrationSettings(forPlugin: self) else { analytics?.log(message: "\(key) destination is disabled via settings") return