fix item type error for iteration

This commit is contained in:
Jiaxin Peng
2024-08-28 20:30:05 +01:00
parent fd29ed820e
commit e8b1617916
3 changed files with 6 additions and 6 deletions

View File

@@ -61,7 +61,7 @@ export class Upload2NotionGeneral extends UploadBaseGeneral {
// remove the annotations from the childArr if type is code block // remove the annotations from the childArr if type is code block
childArr.forEach((block: any) => { childArr.forEach((block: any) => {
if (block.type === "code") { if (block.type === "code") {
block.code.rich_text.forEach(item => { block.code.rich_text.forEach((item: any) => {
if (item.type === "text" && item.annotations) { if (item.type === "text" && item.annotations) {
delete item.annotations; delete item.annotations;
} }

View File

@@ -85,7 +85,7 @@ export class Upload2NotionNext extends UploadBaseNext {
// remove the annotations from the childArr if type is code block // remove the annotations from the childArr if type is code block
childArr.forEach((block: any) => { childArr.forEach((block: any) => {
if (block.type === "code") { if (block.type === "code") {
block.code.rich_text.forEach(item => { block.code.rich_text.forEach((item: any) => {
if (item.type === "text" && item.annotations) { if (item.type === "text" && item.annotations) {
delete item.annotations; delete item.annotations;
} }

View File

@@ -57,7 +57,7 @@ export class Upload2NotionCustom extends UploadBaseCustom {
// remove the annotations from the childArr if type is code block // remove the annotations from the childArr if type is code block
childArr.forEach((block: any) => { childArr.forEach((block: any) => {
if (block.type === "code") { if (block.type === "code") {
block.code.rich_text.forEach(item => { block.code.rich_text.forEach((item: any) => {
if (item.type === "text" && item.annotations) { if (item.type === "text" && item.annotations) {
delete item.annotations; delete item.annotations;
} }