Skip to content

Commit b670eea

Browse files
Fix async after upload image function, add some error logging (#6)
1 parent 9748954 commit b670eea

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,11 @@ async function main() {
8080
pageTitle,
8181
currentParentPageId
8282
);
83-
markdownToHtml(root + path, (err, data) => {
84-
let htmlContent = handleAttachments(contentPageId, data);
83+
markdownToHtml(root + path, async (err, data) => {
84+
if(err) {
85+
console.log(err);
86+
}
87+
let htmlContent = await handleAttachments(contentPageId, data);
8588
syncConfluence.putContent(contentPageId, pageTitle, htmlContent);
8689
});
8790
} else {

0 commit comments

Comments
 (0)