From 376454c5c51d325429b97a4032369c9c91fb9e9e Mon Sep 17 00:00:00 2001 From: cliftonc Date: Sat, 26 Nov 2022 09:14:33 +0100 Subject: [PATCH] Allow empty inputs --- dist/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index 94a3bce..99057f7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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`)