aboutsummaryrefslogtreecommitdiff
path: root/src/client/apis/google_docs/GoogleApiClientUtils.ts
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2020-05-05 02:48:03 -0700
committerSam Wilkins <samwilkins333@gmail.com>2020-05-05 02:48:03 -0700
commitaa1eb6ba4217fb48ab10539ca0373b4a1f649192 (patch)
tree69cbc232d8e642cc91d431419d36297656240527 /src/client/apis/google_docs/GoogleApiClientUtils.ts
parent3805029b253fcf224ad8b1effadfddf743704373 (diff)
database, delete and google authentication simplifications and improvements, as well as formatted text box updates data state at field key not just data
Diffstat (limited to 'src/client/apis/google_docs/GoogleApiClientUtils.ts')
-rw-r--r--src/client/apis/google_docs/GoogleApiClientUtils.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/apis/google_docs/GoogleApiClientUtils.ts b/src/client/apis/google_docs/GoogleApiClientUtils.ts
index fa67ddbef..2f3cac8d3 100644
--- a/src/client/apis/google_docs/GoogleApiClientUtils.ts
+++ b/src/client/apis/google_docs/GoogleApiClientUtils.ts
@@ -95,7 +95,7 @@ export namespace GoogleApiClientUtils {
export type ExtractResult = { text: string, paragraphs: DeconstructedParagraph[] };
export const extractText = (document: docs_v1.Schema$Document, removeNewlines = false): ExtractResult => {
const paragraphs = extractParagraphs(document);
- let text = paragraphs.map(paragraph => paragraph.contents.filter(content => !("inlineObjectId" in content)).map(run => run as docs_v1.Schema$TextRun).join("")).join("");
+ let text = paragraphs.map(paragraph => paragraph.contents.filter(content => !("inlineObjectId" in content)).map(run => (run as docs_v1.Schema$TextRun).content).join("")).join("");
text = text.substring(0, text.length - 1);
removeNewlines && text.replace(/\n/g, "");
return { text, paragraphs };