Skip to content

Commit

Permalink
Allow empty inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
cliftonc committed Nov 26, 2022
1 parent 26093ea commit 376454c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7693,7 +7693,7 @@ const translate = async ({ notion, database, rows, fields }) => {
for (const row of rows) {
const inputText = getText(row.properties[fields.input].rich_text)
const inputLanguage = fields.language ? getText(row.properties[fields.language].rich_text) || defaultLanguageFrom : defaultLanguageFrom
const translatedText = await translator(inputText, { from: inputLanguage, to: defaultLanguageTo })
const translatedText = inputText ? await translator(inputText, { from: inputLanguage, to: defaultLanguageTo }) : ''
await updateNotionRow(row, translatedText, { notion, database, fields })
}
core.info(`Completed with ${updatedRows} created and ${erroredRows} with errors`)
Expand Down

0 comments on commit 376454c

Please sign in to comment.