mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-30 00:48:36 +08:00
fix item type error for iteration
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user