Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rmch91 committed Oct 15, 2024
1 parent 8e39174 commit 3564192
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,13 @@ export class MediaService {
* This method constructs a media query string from the provided query
* properties in config and joining them with "and".
*/
protected generateMediaQuery(queries: PictureElementQueries): string {
protected generateMediaQuery(
queries: PictureElementQueries | undefined
): string {
if (!queries) {
return '';
}

return Object.entries(queries)
.filter(([key, value]) => !!key && !!value)
.map(([key, value]) => `(${key}: ${value})`)
Expand Down

0 comments on commit 3564192

Please sign in to comment.