chore: return early on promise rejection (#29539)

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
This commit is contained in:
trop[bot]
2021-06-07 10:17:00 +09:00
committed by GitHub
parent e67b244571
commit f1752a0b6f

View File

@@ -291,6 +291,7 @@ v8::Local<v8::Promise> Cookies::Set(v8::Isolate* isolate,
const std::string* url_string = details.FindStringKey("url");
if (!url_string) {
promise.RejectWithErrorMessage("Missing required option 'url'");
return handle;
}
const std::string* name = details.FindStringKey("name");
const std::string* value = details.FindStringKey("value");