Only "title" and "program" are required for AddUserTasks
This commit is contained in:
parent
47c18fef7f
commit
0db2769781
1 changed files with 6 additions and 4 deletions
|
@ -42,10 +42,12 @@ struct Converter<Browser::UserTask> {
|
|||
mate::Dictionary dict;
|
||||
if (!ConvertFromV8(isolate, val, &dict))
|
||||
return false;
|
||||
return dict.Get("program", &(out->program)) &&
|
||||
dict.Get("arguments", &(out->arguments)) &&
|
||||
dict.Get("title", &(out->title)) &&
|
||||
if (!dict.Get("program", &(out->program)) ||
|
||||
!dict.Get("title", &(out->title)))
|
||||
return false;
|
||||
dict.Get("arguments", &(out->arguments));
|
||||
dict.Get("description", &(out->description));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue