diff --git a/src/editor/model.js b/src/editor/model.js index 759e13aabb..580085975f 100644 --- a/src/editor/model.js +++ b/src/editor/model.js @@ -18,7 +18,7 @@ limitations under the License. import {diffAtCaret, diffDeletion} from "./diff"; export default class EditorModel { - constructor(parts, partCreator, updateCallback) { + constructor(parts, partCreator, updateCallback = null) { this._parts = parts; this._partCreator = partCreator; this._activePartIdx = null; diff --git a/src/editor/parts.js b/src/editor/parts.js index 2a6ad81b9b..d3569a7347 100644 --- a/src/editor/parts.js +++ b/src/editor/parts.js @@ -363,7 +363,7 @@ export function autoCompleteCreator(getAutocompleterComponent, updateQuery) { } export class PartCreator { - constructor(room, client, autoCompleteCreator) { + constructor(room, client, autoCompleteCreator = null) { this._room = room; this._client = client; this._autoCompleteCreator = {create: autoCompleteCreator && autoCompleteCreator(this)};