Skip to content

Commit

Permalink
fix(GDoc): Use isA instead of isParagraph
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Jun 18, 2021
1 parent fbd0214 commit ffc83fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/codecs/gdoc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ async function decodeDocument(
const block = await decodeParagraph(para, lists)

// Ignore empty paragraphs
if (schema.isParagraph(block)) {
if (schema.isA('Paragraph', block)) {
const { content } = block
if (
content.length === 0 ||
Expand All @@ -197,7 +197,7 @@ async function decodeDocument(

// If this para has the `Title` style then use it's content
// as the title of the article (overrides doc.title)
if (schema.isParagraph(block) && para.paragraphStyle) {
if (schema.isA('Paragraph', block) && para.paragraphStyle) {
const styleType = para.paragraphStyle.namedStyleType
if (styleType && styleType === 'TITLE') {
const { content } = block
Expand Down

0 comments on commit ffc83fc

Please sign in to comment.