make named options argument optional

pull/21833/head
Bruno Windels 2019-08-20 17:15:12 +02:00
parent ea1faacd8b
commit 0adca10f9f
2 changed files with 2 additions and 2 deletions

View File

@ -236,7 +236,7 @@ function parsePlainTextMessage(body, partCreator, isQuotedMessage) {
return parts;
}
export function parseEvent(event, partCreator, {isQuotedMessage = false}) {
export function parseEvent(event, partCreator, {isQuotedMessage = false} = {}) {
const content = event.getContent();
let parts;
if (content.format === "org.matrix.custom.html") {

View File

@ -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 parser = new Markdown(md);
if (!parser.isPlainText() || forceHTML) {