fix syntax loop debugger misalignment

This commit is contained in:
LenAnderson 2024-07-29 21:43:38 -04:00
parent 1d4c44fcf6
commit 18e3659914

View File

@ -927,6 +927,11 @@ export class QuickReply {
if (!messageSyntaxInner || !message) return requestAnimationFrame(updateSyntaxLoop); if (!messageSyntaxInner || !message) return requestAnimationFrame(updateSyntaxLoop);
// elements no longer part of the document // elements no longer part of the document
if (!messageSyntaxInner.closest('body')) return; if (!messageSyntaxInner.closest('body')) return;
// debugger is running
if (this.isExecuting) {
lastMessageValue = null;
return requestAnimationFrame(updateSyntaxLoop);
}
// value hasn't changed // value hasn't changed
if (wasSyntax == syntax.checked && lastMessageValue == message.value) return requestAnimationFrame(updateSyntaxLoop); if (wasSyntax == syntax.checked && lastMessageValue == message.value) return requestAnimationFrame(updateSyntaxLoop);
wasSyntax = syntax.checked; wasSyntax = syntax.checked;