aboutsummaryrefslogtreecommitdiff
path: root/src/client/apis/google_docs/GoogleApiClientUtils.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-12-04 17:38:36 -0500
committerbobzel <zzzman@gmail.com>2023-12-04 17:38:36 -0500
commit2bd239e39264a362d1fbb013ce2613d03247d78e (patch)
tree6e537dc0c35529c6ee27758a4dec03e23210dbc6 /src/client/apis/google_docs/GoogleApiClientUtils.ts
parentcf7a7dc34426dacf018ac98a83a9589106ae7256 (diff)
trying to do version updates on all npm packages.
Diffstat (limited to 'src/client/apis/google_docs/GoogleApiClientUtils.ts')
-rw-r--r--src/client/apis/google_docs/GoogleApiClientUtils.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/apis/google_docs/GoogleApiClientUtils.ts b/src/client/apis/google_docs/GoogleApiClientUtils.ts
index 551dca073..c8f381cc0 100644
--- a/src/client/apis/google_docs/GoogleApiClientUtils.ts
+++ b/src/client/apis/google_docs/GoogleApiClientUtils.ts
@@ -84,7 +84,7 @@ export namespace GoogleApiClientUtils {
};
try {
const schema: docs_v1.Schema$Document = await Networking.PostToServer(path, parameters);
- return schema.documentId;
+ return schema.documentId === null ? undefined : schema.documentId;
} catch {
return undefined;
}
@@ -195,7 +195,7 @@ export namespace GoogleApiClientUtils {
const title = document.title;
let bodyLines = Utils.extractText(document).text.split("\n");
options.removeNewlines && (bodyLines = bodyLines.filter(line => line.length));
- return { title, bodyLines };
+ return { title: title ?? "", bodyLines };
}
});
};