This commit is contained in:
Natsumi
2025-10-31 16:17:43 +11:00
parent 27464ca65f
commit a86a8fe6f5
4 changed files with 24 additions and 9 deletions

View File

@@ -492,7 +492,12 @@
D.metadata.creationDate = '';
D.metadata.application = '';
const metadata = JSON.parse(json);
let metadata = null;
try {
metadata = JSON.parse(json);
} catch (e) {
console.error('Error parsing screenshot metadata JSON:', e);
}
if (!metadata?.sourceFile) {
D.metadata = {};
D.metadata.error = 'Invalid file selected. Please select a valid VRChat screenshot.';