mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 02:40:24 +08:00
fix: index out of range exception when trying to get friendly name of upstream
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -86,6 +86,6 @@ namespace SourceGit.Converters
|
||||
new FuncValueConverter<string, bool>(v => v != null && v.Trim().Length > 0);
|
||||
|
||||
public static readonly FuncValueConverter<string, string> ToFriendlyUpstream =
|
||||
new FuncValueConverter<string, string>(v => v != null ? v.Substring(13) : string.Empty);
|
||||
new FuncValueConverter<string, string>(v => v is { Length: > 13 } ? v.Substring(13) : string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user