From 0db2769781214ada34b7017b3c258324b7232d20 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 17 Nov 2014 17:26:44 +0800 Subject: [PATCH] Only "title" and "program" are required for AddUserTasks --- atom/browser/api/atom_api_app.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/atom/browser/api/atom_api_app.cc b/atom/browser/api/atom_api_app.cc index 12668dbf344..ce56c0da30c 100644 --- a/atom/browser/api/atom_api_app.cc +++ b/atom/browser/api/atom_api_app.cc @@ -42,10 +42,12 @@ struct Converter { 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)) && - dict.Get("description", &(out->description)); + 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; } };