From 328bfa03e049626119c7c3f7155885c6e795a268 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Tue, 15 Sep 2020 12:50:02 -0700 Subject: [PATCH] Allow refreshObject task on root param --- lib/api-functions.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/api-functions.ts b/lib/api-functions.ts index f6ef813..1ad83dd 100644 --- a/lib/api-functions.ts +++ b/lib/api-functions.ts @@ -236,6 +236,10 @@ function sanitizeTask(task): void { break; case "refreshObject": + if (typeof task.objectName !== "string") + throw new Error("Missing 'objectName' property"); + break; + case "deleteObject": if (typeof task.objectName !== "string" || !task.objectName.length) throw new Error("Missing 'objectName' property");