Adds null check for status before checking status code. Avoids throwing exceptions if status is not defined. (#145) * Adds check for status in responseMap as part of error checking. * formats file
diff --git a/lib/io.dart b/lib/io.dart index ba37a29..e06b1ba 100644 --- a/lib/io.dart +++ b/lib/io.dart
@@ -103,7 +103,9 @@ if (response.statusCode < 200 || response.statusCode > 299 || - (respBody is Map && respBody['status'] != 0)) { + (respBody is Map + && respBody['status'] != null + && respBody['status'] != 0)) { throw new WebDriverException( httpStatusCode: response.statusCode, httpReasonPhrase: response.reasonPhrase,