Skip to content

Commit

Permalink
修复报错 (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
monitor1394 committed Nov 25, 2023
1 parent cdc1821 commit 7ea260b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Runtime/Helper/FormatterHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class FormatterHelper

public static bool NeedFormat(string content)
{
return content.IndexOf('{') >= 0;
return !string.IsNullOrEmpty(content) && content.IndexOf('{') >= 0;
}

/// <summary>
Expand Down

0 comments on commit 7ea260b

Please sign in to comment.