aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-07-30 16:22:54 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-07-30 16:22:54 -0400
commit8ca17d379ce7d3cc751408553b6819223d31a3e0 (patch)
tree8ae7703c5a91bfef95db90bb08a274c3602be58f /src/server
parent28db2fab55015f26286c577347a90e5acb24ca0f (diff)
Fixed import thing
Diffstat (limited to 'src/server')
-rw-r--r--src/server/index.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/server/index.ts b/src/server/index.ts
index 281fc1eb2..1912cf5c1 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -205,6 +205,10 @@ async function getDocs(id: string) {
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);
+ }
} else if (field.__type === "list") {
ids.push(...fn(field));
} else if (typeof field === "string") {
@@ -293,6 +297,10 @@ app.post("/uploadDoc", (req, res) => {
if (field.__type === "proxy" || field.__type === "prefetch_proxy") {
field.fieldId = getId(field.fieldId);
+ } else if (field.__type === "script" || field.__type === "computed") {
+ if (field.captures) {
+ field.captures.fieldId = getId(field.captures.fieldId);
+ }
} else if (field.__type === "list") {
mapFn(field);
} else if (typeof field === "string") {