Skip to content

Commit f897054

Browse files
committed
refactor: fix building for release
1 parent a3b15ca commit f897054

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/GitHub/upload.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,14 +453,15 @@ export default class Publisher {
453453
*/
454454

455455
async uploadImage(imageFile: TFile, properties: MonoProperties) {
456-
let imageBin = await this.vault.readBinary(imageFile);
456+
let imageBin: ArrayBuffer = await this.vault.readBinary(imageFile);
457457
const prop = properties.frontmatter.prop;
458458
let image64 = arrayBufferToBase64(imageBin);
459459
if (imageFile.name.includes("excalidraw")) {
460460
const svg = await convertToHTMLSVG(imageFile, this.plugin.app);
461461
if (svg) {
462462
//convert to base64
463463
image64 = Base64.encode(svg).toString();
464+
//@ts-ignore
464465
imageBin = Buffer.from(image64, "base64");
465466
}
466467
}

src/utils/parse_frontmatter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export function getProperties(
112112
if (checkSet && repository && plugin.repositoryFrontmatter[repository.smartKey]) {
113113
const setFrontmatter = plugin.repositoryFrontmatter[repository.smartKey];
114114
delete setFrontmatter?.[settings.plugin.shareKey];
115+
//@ts-ignore
115116
frontmatter = merge.withOptions(
116117
{ allowUndefinedOverrides: false },
117118
setFrontmatter ?? {},
@@ -699,6 +700,7 @@ export function mergeFrontmatter(
699700
) {
700701
delete sourceFrontmatter?.[shareKey];
701702
if (sourceFrontmatter && frontmatter)
703+
//@ts-ignore
702704
frontmatter = merge.withOptions(
703705
{ allowUndefinedOverrides: false },
704706
sourceFrontmatter,

0 commit comments

Comments
 (0)