From aeca1cccaffa67c56fd31626297f8a03e1d8b648 Mon Sep 17 00:00:00 2001 From: Max Cobb Date: Sun, 11 Apr 2021 20:25:35 +0100 Subject: [PATCH] update setAutoUpdate method guard statement --- Sources/FocusEntity/FocusEntity.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/FocusEntity/FocusEntity.swift b/Sources/FocusEntity/FocusEntity.swift index 0433185..60f71cc 100644 --- a/Sources/FocusEntity/FocusEntity.swift +++ b/Sources/FocusEntity/FocusEntity.swift @@ -83,8 +83,8 @@ open class FocusEntity: Entity, HasAnchoring, HasFocusEntity { public private(set) var isAutoUpdating: Bool = false public func setAutoUpdate(to autoUpdate: Bool) { - guard autoUpdate == self.isAutoUpdating, - (autoUpdate && self.arView == nil) else { + guard autoUpdate != self.isAutoUpdating, + !(autoUpdate && self.arView == nil) else { return } self.updateCancellable?.cancel()