Skip to content

Commit 42870cf

Browse files
yardenshohamsilverwindGiteaBot
authored
Remove jQuery class from the commit button (#30178)
- Switched from jQuery class functions to plain JavaScript `classList` - Tested the commit button disabled toggling functionality and it works as before --------- Signed-off-by: Yarden Shoham <[email protected]> Co-authored-by: silverwind <[email protected]> Co-authored-by: Giteabot <[email protected]>
1 parent c487a32 commit 42870cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web_src/js/features/repo-editor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ export function initRepoEditor() {
147147
silent: true,
148148
dirtyClass: dirtyFileClass,
149149
fieldSelector: ':input:not(.commit-form-wrapper :input)',
150-
change() {
151-
const dirty = $(this).hasClass(dirtyFileClass);
150+
change($form) {
151+
const dirty = $form[0]?.classList.contains(dirtyFileClass);
152152
commitButton.disabled = !dirty;
153153
},
154154
});

0 commit comments

Comments
 (0)