diff options
author | Lionel Han <47760119+IGoByJoe@users.noreply.github.com> | 2020-07-22 20:56:22 -0700 |
---|---|---|
committer | Lionel Han <47760119+IGoByJoe@users.noreply.github.com> | 2020-07-22 20:56:22 -0700 |
commit | efb3fa5fa8081256cfae6ae6cb75b010c560a5e5 (patch) | |
tree | 76aad963de3e1928c89df3dccde85d17d48a3e96 /src/server/ApiManagers/DownloadManager.ts | |
parent | 5dcc72c2c61e3aafc30b041e312784d881de72d8 (diff) | |
parent | c9703063f1bc4a2007833164bee19c3b0ffb0792 (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into new_audio
Diffstat (limited to 'src/server/ApiManagers/DownloadManager.ts')
-rw-r--r-- | src/server/ApiManagers/DownloadManager.ts | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/server/ApiManagers/DownloadManager.ts b/src/server/ApiManagers/DownloadManager.ts index c5f3ca717..0d4472fdc 100644 --- a/src/server/ApiManagers/DownloadManager.ts +++ b/src/server/ApiManagers/DownloadManager.ts @@ -80,20 +80,14 @@ async function getDocs(id: string) { } const ids: string[] = []; for (const key in doc.fields) { - if (!doc.fields.hasOwnProperty(key)) { - continue; - } + if (!doc.fields.hasOwnProperty(key)) { continue; } const field = doc.fields[key]; - if (field === undefined || field === null) { - continue; - } + if (field === undefined || field === null) { continue; } if (field.__type === "proxy" || field.__type === "prefetch_proxy") { ids.push(field.fieldId); } else if (field.__type === "script" || field.__type === "computed") { - if (field.captures) { - ids.push(field.captures.fieldId); - } + field.captures && ids.push(field.captures.fieldId); } else if (field.__type === "list") { ids.push(...fn(field)); } else if (typeof field === "string") { |