diff --git a/codejar.ts b/codejar.ts index 4d6a8b3..da695da 100644 --- a/codejar.ts +++ b/codejar.ts @@ -464,8 +464,8 @@ export function CodeJar(editor: HTMLElement, highlight: (e: HTMLElement, pos?: P } return { - updateOptions(options: Partial) { - options = {...options, ...options} + updateOptions(newOptions: Partial) { + Object.assign(options, newOptions) }, updateCode(code: string) { editor.textContent = code