fix: real project README and save-file version validation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,5 +21,8 @@ export function deserialize(json: string): HistoryEntry[] {
|
||||
if (data.variant !== 'duplicate-chess' || !Array.isArray(data.moves)) {
|
||||
throw new Error('Not a duplicate-chess save file');
|
||||
}
|
||||
if (data.version !== 1) {
|
||||
throw new Error('Unsupported save version');
|
||||
}
|
||||
return data.moves;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user