Skip to content

Commit

Permalink
user[editor]がない場合にreturn nullして処理を中断するよう修正
Browse files Browse the repository at this point in the history
  • Loading branch information
88-99 committed Feb 28, 2024
1 parent 9c1b67b commit 54232a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/javascript/editor-selection-form.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
document.addEventListener('DOMContentLoaded', () => {
if (!document.querySelector('[name="user[editor]"]')) {
return null
}

const editors = document.getElementsByName('user[editor]')
const othersEditor = document.getElementById('others_editor')
editors.forEach((editor) => {
Expand Down

0 comments on commit 54232a2

Please sign in to comment.