From a37574988a692e9475f6d67b0736a3106a71f1e0 Mon Sep 17 00:00:00 2001 From: Krzysztof Moch Date: Thu, 4 Jan 2024 14:03:14 +0100 Subject: [PATCH] apply code review nit --- ios/Video/Features/RCTPlayerObserver.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ios/Video/Features/RCTPlayerObserver.swift b/ios/Video/Features/RCTPlayerObserver.swift index fdff8836f1..02c32f82d0 100644 --- a/ios/Video/Features/RCTPlayerObserver.swift +++ b/ios/Video/Features/RCTPlayerObserver.swift @@ -104,8 +104,10 @@ class RCTPlayerObserver: NSObject, AVPlayerItemMetadataOutputPushDelegate { } func metadataOutput(_: AVPlayerItemMetadataOutput, didOutputTimedMetadataGroups groups: [AVTimedMetadataGroup], from _: AVPlayerItemTrack?) { + guard let _handlers else { return } + for metadataGroup in groups { - _handlers?.handleTimeMetadataChange(timedMetadata: metadataGroup.items) + _handlers.handleTimeMetadataChange(timedMetadata: metadataGroup.items) } }