chore(core): improve shareLatest implementation

This commit is contained in:
Josep M Sobrepere 2021-04-08 10:32:01 +02:00
parent ffa503a982
commit 22f86e08b6

View File

@ -49,8 +49,8 @@ const shareLatest = <T>(
subject!.complete()
},
)
if (subscription.closed) subscription = null
emitIfEmpty()
if (subscription && subscription.closed) subscription = null
} else {
innerSub = subject.subscribe(subscriber)
if (currentValue !== EMPTY_VALUE) {