Fixing UI for 2.1 data changes
This commit is contained in:
@@ -21,14 +21,8 @@ export default function verifyArchiveSafety({ meta, creature, properties, experi
|
||||
}
|
||||
});
|
||||
properties.forEach(prop => {
|
||||
if (meta.schemaVersion.schemaVersion >= 3) {
|
||||
if (prop.root?.id !== creatureId) {
|
||||
throw new Meteor.Error('Malicious prop', 'Properties contains an entry for the wrong creature');
|
||||
}
|
||||
} else {
|
||||
if (prop.ancestors?.[0]?.id !== creatureId) {
|
||||
throw new Meteor.Error('Malicious prop', 'Properties contains an entry for the wrong creature');
|
||||
}
|
||||
if (prop.root?.id !== creatureId) {
|
||||
throw new Meteor.Error('Malicious prop', 'Properties contains an entry for the wrong creature');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,10 +10,11 @@ import STORAGE_LIMITS from '/imports/constants/STORAGE_LIMITS';
|
||||
// TODO make this a union type of all CreatureProperty types
|
||||
const CreatureProperties: Mongo.Collection<any> = new Mongo.Collection('creatureProperties');
|
||||
|
||||
export interface CreatureProperty {
|
||||
export interface CreatureProperty extends TreeDoc {
|
||||
_id: string
|
||||
_migrationError?: string
|
||||
tags: string[]
|
||||
type: string
|
||||
disabled?: boolean
|
||||
icon?: {
|
||||
name: string
|
||||
|
||||
Reference in New Issue
Block a user