diff --git a/services/web/frontend/js/features/source-editor/extensions/line-wrapping-indentation.ts b/services/web/frontend/js/features/source-editor/extensions/line-wrapping-indentation.ts index 0b1ce354b0..31f47b6003 100644 --- a/services/web/frontend/js/features/source-editor/extensions/line-wrapping-indentation.ts +++ b/services/web/frontend/js/features/source-editor/extensions/line-wrapping-indentation.ts @@ -48,7 +48,8 @@ export const lineWrappingIndentation = (visual: boolean) => { ) }, write(value: number, view: EditorView) { - if (view.state.field(field) !== value) { + const stateValue = view.state.field(field, false) + if (stateValue !== undefined && stateValue !== value) { window.setTimeout(() => { view.dispatch({ effects: setMaxIndentEffect.of(value),