mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Refactor Popup.complete to async
This commit is contained in:
@ -1653,8 +1653,8 @@ async function buttonsCallback(args, text) {
|
||||
const buttonElement = document.createElement('div');
|
||||
buttonElement.classList.add('menu_button', 'result-control', 'wide100p');
|
||||
buttonElement.dataset.result = String(result);
|
||||
buttonElement.addEventListener('click', () => {
|
||||
popup?.complete(result);
|
||||
buttonElement.addEventListener('click', async () => {
|
||||
await popup.complete(result);
|
||||
});
|
||||
buttonElement.innerText = button;
|
||||
buttonContainer.appendChild(buttonElement);
|
||||
|
Reference in New Issue
Block a user