Only access lastSubmission if it exists

This commit is contained in:
Johannes Zellner
2025-06-12 22:33:57 +02:00
parent afd19a7307
commit b61b45177a
+1 -1
View File
@@ -457,7 +457,7 @@ async function interactionConfirm(req, res, next) {
const user = await users.get(accountId);
if (!user) return next(new Error('User not found'));
user.ghost = lastSubmission.ghost; // restore ghost flag
user.ghost = lastSubmission ? lastSubmission.ghost : false; // restore ghost flag
// Check if user has access to the app if client refers to an app
if (client.appId) {