The timeout in the onMessageReceived function in backjground.js introduces a race condition if the user hits submit more than once within 30 seconds:
case 'userClickedSubmit':
userJustSubmitted = true;
setTimeout(() => {
userJustSubmitted = false;
}, 30000); // Reset after 30 seconds
break;
I can fix it