Skip to content

Commit bd379d9

Browse files
committed
handle null string
1 parent 24bd0d9 commit bd379d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

PreMailer.Net/PreMailer.Net/CssParser.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ private static string CleanupMediaQueries(string s)
128128

129129
public static IEnumerable<string> GetUnsupportedMediaQueries(string s)
130130
{
131+
if (string.IsNullOrWhiteSpace(s))
132+
{
133+
yield break;
134+
}
131135
foreach (Match match in MediaQueryRegex.Matches(s))
132136
{
133137
if (!SupportedMediaQueriesRegex.IsMatch(match.Value))

0 commit comments

Comments
 (0)