Skip to content

Commit 4914e89

Browse files
committed
Better code style
1 parent 77f35ea commit 4914e89

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

dotnet/src/webdriver/DriverFinder.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,12 @@ private SeleniumManagerPaths BinaryPaths()
114114
string driverPath = binaryPaths.DriverPath;
115115
string browserPath = binaryPaths.BrowserPath;
116116

117-
if (File.Exists(driverPath))
118-
{
119-
}
120-
else
117+
if (!File.Exists(driverPath))
121118
{
122119
throw new NoSuchDriverException($"The driver path is not a valid file: {driverPath}");
123120
}
124121

125-
if (File.Exists(browserPath))
126-
{
127-
}
128-
else
122+
if (!File.Exists(browserPath))
129123
{
130124
throw new NoSuchDriverException($"The browser path is not a valid file: {browserPath}");
131125
}

0 commit comments

Comments
 (0)