mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
chore: return early on promise rejection (#29537)
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
This commit is contained in:
@@ -293,6 +293,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");
|
||||
|
||||
Reference in New Issue
Block a user