Skip to content

Commit

Permalink
JS optional changing is just too new
Browse files Browse the repository at this point in the history
Fixes the editor not working on some browsers still in use.
  • Loading branch information
JRaspass committed Mar 27, 2021
1 parent 3f45f30 commit 6cb3ae1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions views/js/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ for (const input of document.querySelectorAll('[list]')) {
let controller;

input.oninput = async () => {
controller?.abort(); // Abort the old request (if exists).
input.list.innerHTML = ''; // Clear current suggestions.
if (controller) controller.abort(); // Abort the old request (if exists).
input.list.innerHTML = ''; // Clear current suggestions.

if (input.value != '')
input.list.append(...(await (await fetch(
Expand Down

0 comments on commit 6cb3ae1

Please sign in to comment.