make named options argument optional
This commit is contained in:
@@ -236,7 +236,7 @@ function parsePlainTextMessage(body, partCreator, isQuotedMessage) {
|
|||||||
return parts;
|
return parts;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function parseEvent(event, partCreator, {isQuotedMessage = false}) {
|
export function parseEvent(event, partCreator, {isQuotedMessage = false} = {}) {
|
||||||
const content = event.getContent();
|
const content = event.getContent();
|
||||||
let parts;
|
let parts;
|
||||||
if (content.format === "org.matrix.custom.html") {
|
if (content.format === "org.matrix.custom.html") {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export function mdSerialize(model) {
|
|||||||
}, "");
|
}, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
export function htmlSerializeIfNeeded(model, {forceHTML = false}) {
|
export function htmlSerializeIfNeeded(model, {forceHTML = false} = {}) {
|
||||||
const md = mdSerialize(model);
|
const md = mdSerialize(model);
|
||||||
const parser = new Markdown(md);
|
const parser = new Markdown(md);
|
||||||
if (!parser.isPlainText() || forceHTML) {
|
if (!parser.isPlainText() || forceHTML) {
|
||||||
|
|||||||
Reference in New Issue
Block a user