Skip to content

Commit

Permalink
Fix updateOptions (#59)
Browse files Browse the repository at this point in the history
* fix update options

* remove semicolon
  • Loading branch information
robertlyall committed Apr 27, 2021
1 parent 2f0d921 commit b037e29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions codejar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ export function CodeJar(editor: HTMLElement, highlight: (e: HTMLElement, pos?: P
}

return {
updateOptions(options: Partial<Options>) {
options = {...options, ...options}
updateOptions(newOptions: Partial<Options>) {
Object.assign(options, newOptions)
},
updateCode(code: string) {
editor.textContent = code
Expand Down

0 comments on commit b037e29

Please sign in to comment.