fix: Guard against empty attachment size

I don't see how this can happen based on default props, but it does
This commit is contained in:
Tom Moor
2023-07-11 20:40:48 -04:00
parent b9fc301589
commit a9ab196a18

View File

@@ -86,7 +86,7 @@ export default class Attachment extends Node {
onMouseDown={this.handleSelect(props)}
context={
node.attrs.href ? (
bytesToHumanReadable(node.attrs.size)
bytesToHumanReadable(node.attrs.size || "0")
) : (
<>
<Trans>Uploading</Trans>