fix(iOS): throw when content id defined with empty string (#3612)
This commit is contained in:
parent
baafda4b26
commit
098358076d
@ -149,7 +149,9 @@ enum RCTVideoDRM {
|
|||||||
) -> Promise<Data> {
|
) -> Promise<Data> {
|
||||||
let url = loadingRequest.request.url
|
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)
|
return Promise(RCTVideoError.invalidContentId as! Error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user