Skip to content

Commit 22a153b

Browse files
committed
Fixed missed bug in 2.2.0
1 parent 324c93f commit 22a153b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Sources/Vexil/Pole.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ public class FlagPole<RootGroup> where RootGroup: FlagContainer {
268268
let wasAlreadyEnabled = _diagnosticsEnabled
269269
_diagnosticsEnabled = true
270270

271-
let snapshot = self.latestSnapshot.value
271+
var snapshot = self.latestSnapshot.value
272272

273273
// if publishing hasn't been started yet (ie they've accessed `_diagnosticsPublisher` before `publisher`)
274274
if self.shouldSetupSnapshotPublishing == false {
@@ -277,7 +277,8 @@ public class FlagPole<RootGroup> where RootGroup: FlagContainer {
277277

278278
// if publishing has already been started, but diagnostics were not previously enabled, we setup again to make sure they are available
279279
} else if wasAlreadyEnabled == false {
280-
self.setupSnapshotPublishing(keys: self.allFlagKeys, sendImmediately: true)
280+
snapshot = self.snapshot()
281+
self.latestSnapshot.send(snapshot)
281282
}
282283

283284
return diagnosticSubject

0 commit comments

Comments
 (0)