|
@@ -363,11 +363,11 @@ ErrorOr<JsonValue, HttpError> Session::find_element(JsonValue const& payload)
|
|
|
if (!payload.is_object())
|
|
|
return HttpError { 400, "invalid argument", "Payload is not a JSON object" };
|
|
|
|
|
|
- auto properties = payload.as_object();
|
|
|
+ auto const& properties = payload.as_object();
|
|
|
// 1. Let location strategy be the result of getting a property called "using".
|
|
|
if (!properties.has("using"sv))
|
|
|
return HttpError { 400, "invalid argument", "No property called 'using' present" };
|
|
|
- auto maybe_location_strategy = properties.get("using"sv);
|
|
|
+ auto const& maybe_location_strategy = properties.get("using"sv);
|
|
|
if (!maybe_location_strategy.is_string())
|
|
|
return HttpError { 400, "invalid argument", "Property 'using' is not a String" };
|
|
|
|
|
@@ -381,7 +381,7 @@ ErrorOr<JsonValue, HttpError> Session::find_element(JsonValue const& payload)
|
|
|
// 4. If selector is undefined, return error with error code invalid argument.
|
|
|
if (!properties.has("value"sv))
|
|
|
return HttpError { 400, "invalid argument", "No property called 'value' present" };
|
|
|
- auto maybe_selector = properties.get("value"sv);
|
|
|
+ auto const& maybe_selector = properties.get("value"sv);
|
|
|
if (!maybe_selector.is_string())
|
|
|
return HttpError { 400, "invalid argument", "Property 'value' is not a String" };
|
|
|
|