+5
-5
actions/publishToPublication.ts
+5
-5
actions/publishToPublication.ts
···
405
405
let [stringValue, facets] = getBlockContent(b.value);
406
406
let block: $Typed<PubLeafletBlocksHeader.Main> = {
407
407
$type: "pub.leaflet.blocks.header",
408
-
level: headingLevel?.data.value || 1,
408
+
level: Math.floor(headingLevel?.data.value || 1),
409
409
plaintext: stringValue,
410
410
facets,
411
411
};
···
438
438
let block: $Typed<PubLeafletBlocksIframe.Main> = {
439
439
$type: "pub.leaflet.blocks.iframe",
440
440
url: url.data.value,
441
-
height: height?.data.value || 600,
441
+
height: Math.floor(height?.data.value || 600),
442
442
};
443
443
return block;
444
444
}
···
452
452
$type: "pub.leaflet.blocks.image",
453
453
image: blobref,
454
454
aspectRatio: {
455
-
height: image.data.height,
456
-
width: image.data.width,
455
+
height: Math.floor(image.data.height),
456
+
width: Math.floor(image.data.width),
457
457
},
458
458
alt: altText ? altText.data.value : undefined,
459
459
};
···
770
770
image: blob.data.blob,
771
771
repeat: backgroundImageRepeat?.data.value ? true : false,
772
772
...(backgroundImageRepeat?.data.value && {
773
-
width: backgroundImageRepeat.data.value,
773
+
width: Math.floor(backgroundImageRepeat.data.value),
774
774
}),
775
775
};
776
776
}