Skip to content

Commit

Permalink
simplify if clause
Browse files Browse the repository at this point in the history
  • Loading branch information
edsilv committed Jan 16, 2025
1 parent 630afc7 commit c0cdb73
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/content-handlers/iiif/IIIFContentHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,8 @@ export default class IIIFContentHandler extends BaseContentHandler<IIIFData>
const hasRanges: boolean = helper.getRanges().length > 0;

if (
(extension!.type === Extension.AV && !hasRanges) ||
(extension!.type === Extension.AV &&
data.config.options.preferMediaElementExtension)
extension!.type === Extension.AV &&
(!hasRanges || data.config.options.preferMediaElementExtension)
) {
extension = await that._getExtensionByType(
Extension.MEDIAELEMENT,
Expand Down

0 comments on commit c0cdb73

Please sign in to comment.