Skip to content

Commit

Permalink
Fix an error when accessing the keyId (#4663)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy authored Jan 16, 2025
1 parent 0d62e13 commit 6b17742
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/streaming/protection/models/DefaultProtectionModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ function DefaultProtectionModel(config) {
const token = { // Implements SessionToken
session: session,
keyId: keySystemMetadata.keyId,
normalizedKeyId: keySystemMetadata.keyId.replace(/-/g, '').toLowerCase(),
normalizedKeyId: keySystemMetadata && keySystemMetadata.keyId ? keySystemMetadata.keyId.replace(/-/g, '').toLowerCase() : '',
initData: keySystemMetadata.initData,
sessionId: keySystemMetadata.sessionId,
sessionType: keySystemMetadata.sessionType,
Expand Down

0 comments on commit 6b17742

Please sign in to comment.