Skip to content

Commit 7d1dfb7

Browse files
committed
Fix of ads UI not shown because of an uncaught exception if the config for the AdMessageLabel has no text
1 parent 507e6bf commit 7d1dfb7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1414
### Fixed
1515

1616
- Type incompatibility warnings with Player version 8.235.0 and higher
17+
- Ads UI variant not shown
1718

1819
## [4.4.0] - 2025-11-27
1920

src/ts/components/ads/AdMessageLabel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ export class AdMessageLabel extends Label<LabelConfig> {
4545
super.configure(player, uimanager);
4646

4747
const config = this.getConfig();
48-
let text = config.text;
48+
let text = config.text || '';
4949

5050
const updateMessageHandler = () => {
5151
this.setText(StringUtils.replaceAdMessagePlaceholders(i18n.performLocalization(text), null, player));
5252
};
5353

5454
const adStartHandler = (event: AdEvent) => {
5555
const uiConfig = (event.ad as LinearAd).uiConfig;
56-
text = uiConfig?.message || config.text;
56+
text = uiConfig?.message || config.text || '';
5757

5858
updateMessageHandler();
5959

0 commit comments

Comments
 (0)