Refactor the inbox hat_id function to drop the index call

This commit is contained in:
William Karsten 2022-06-15 10:02:49 -05:00
parent 274c253f37
commit f29ba4d1a5
1 changed files with 2 additions and 4 deletions

View File

@ -493,10 +493,8 @@ onPageLoad(() => {
// Inbox Related Funtions
on('change', '#message_hat_id', (event) => {
let selectedOption = event.target.options.selectedIndex;
if (event.target.options[selectedOption].getAttribute('data-modnote') == 'true') {
document.getElementById('message_mod_note').checked = true;
} else document.getElementById('message_mod_note').checked = false;
let selectedOption = event.target.selectedOptions[0];
document.getElementById('message_mod_note').checked = (selectedOption.getAttribute('data-modnote') === 'true');
});
// Story Related Functions