fix(iOS): throw when content id defined with empty string (#3612)

This commit is contained in:
YangJH 2024-03-26 21:55:11 +09:00 committed by GitHub
parent baafda4b26
commit 098358076d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -149,7 +149,9 @@ enum RCTVideoDRM {
) -> Promise<Data> {
let url = loadingRequest.request.url
guard let contentId = contentId ?? url?.absoluteString.replacingOccurrences(of: "skd://", with: "") else {
let parsedContentId = contentId != nil && !contentId!.isEmpty ? contentId : nil
guard let contentId = parsedContentId ?? url?.absoluteString.replacingOccurrences(of: "skd://", with: "") else {
return Promise(RCTVideoError.invalidContentId as! Error)
}