diff --git a/web_src/js/features/repo-editor.js b/web_src/js/features/repo-editor.js index fc951750a96..01dc4b95aaa 100644 --- a/web_src/js/features/repo-editor.js +++ b/web_src/js/features/repo-editor.js @@ -147,8 +147,8 @@ export function initRepoEditor() { silent: true, dirtyClass: dirtyFileClass, fieldSelector: ':input:not(.commit-form-wrapper :input)', - change() { - const dirty = $(this).hasClass(dirtyFileClass); + change($form) { + const dirty = $form[0]?.classList.contains(dirtyFileClass); commitButton.disabled = !dirty; }, });