From 5261bb75a6758786bc391b3e0869d88bec5092af Mon Sep 17 00:00:00 2001 From: Mo Mustafa Date: Wed, 11 Sep 2024 12:22:32 -0700 Subject: [PATCH] fix:accept CurrentPlayheadPosition with 0 value --- src/session.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/session.ts b/src/session.ts index 3c7e9f2..3cf4614 100644 --- a/src/session.ts +++ b/src/session.ts @@ -160,9 +160,8 @@ export class MediaSession { options: Options = {}, ): MediaEvent { // Set event option based on options or current state - if (options?.currentPlayheadPosition !== undefined) { - this.currentPlayheadPosition = options?.currentPlayheadPosition; - } + this.currentPlayheadPosition = + options?.currentPlayheadPosition ?? this.currentPlayheadPosition; // Merge Session Attributes with any other optional Event Attributes. // Event-Level Custom Attributes will override Session Custom Attributes if there is a collison.