1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

added some notes

This commit is contained in:
Cyber Gsus 2021-06-10 12:36:15 +02:00
parent bc32f2d21f
commit 9cd8cbf42c

View File

@ -380,6 +380,15 @@ export class ReadWriteProxy {
/** @returns {ExplainedResult} */
internalVerifyEntry(data) {
// NOTE: this check could be removed if it's only used in `readAsync`,
// as the data HAS to be migrated. Probably with a sanity check at `readAsync`
// to check that migration did set the version flag accordingly, i.e
// ```js
// if (contents.version < currentVersion) {
// // .. migrate contents and check result
// if (contents.version !== currentVersion) return Prmoise.reject(`Version mismatch after migration: ...`);
// }
// ```
if (data.version !== this.getCurrentVersion()) {
return ExplainedResult.bad(
"Version mismatch, got " + data.version + " and expected " + this.getCurrentVersion()