Skip to content

Commit

Permalink
fix(iOS): throw when content id defined with empty string (#3612)
Browse files Browse the repository at this point in the history
  • Loading branch information
YangJonghun committed Mar 26, 2024
1 parent baafda4 commit 0983580
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ios/Video/Features/RCTVideoDRM.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 0983580

Please sign in to comment.