Skip to content

Commit 7d799e0

Browse files
[UXP-104] add check for media playlist resize
1 parent ee621ea commit 7d799e0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/app/shared/media-player/media-player.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { BehaviorSubject, Observable } from 'rxjs';
1515

1616
import { MediaViewerItem } from '../../core/shared/media-viewer-item.model';
1717
import { VideojsService } from './services/videojs.service';
18+
import { hasValue } from '../empty.util';
1819

1920
@Component({
2021
selector: 'ds-media-player',
@@ -267,6 +268,8 @@ export class MediaPlayerComponent implements OnInit, OnDestroy {
267268
* Resize playlist container
268269
*/
269270
private resizeMediaPlaylist(): void {
270-
this.playlistContainerRef.nativeElement.style.height = `${this.videoContainerRef.nativeElement.getBoundingClientRect().height}px`;
271+
if (hasValue(this.playlistContainerRef?.nativeElement)) {
272+
this.playlistContainerRef.nativeElement.style.height = `${this.videoContainerRef.nativeElement.getBoundingClientRect().height}px`;
273+
}
271274
}
272275
}

0 commit comments

Comments
 (0)