Skip to content

Commit

Permalink
Fallback to device style if theme styles undefined
Browse files Browse the repository at this point in the history
As described in the following feedback, there can be times when the editor background colour returns an "undefined" string: #55627

With this commit, that case is accounted for, with the default dark/light styles being applied.
  • Loading branch information
Siobhan committed Nov 3, 2023
1 parent bab1437 commit e83f5c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/components/src/mobile/audio-player/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ function Player( {
const editorColors = globalStyles?.baseColors?.color;
const editorBackgroundColor = editorColors?.background;

if ( typeof editorBackgroundColor === 'undefined' ) {
if (
typeof editorBackgroundColor === 'undefined' ||
editorBackgroundColor === 'undefined'
) {
return getStylesFromColorScheme( baseStyle, darkStyle );
}

Expand Down

0 comments on commit e83f5c6

Please sign in to comment.