Fixed buffs not being able to be added to actions after creation

This commit is contained in:
Thaum Rystra
2020-04-04 19:09:00 +02:00
parent 6008d8b47a
commit e06196a54c
2 changed files with 8 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
import SimpleSchema from 'simpl-schema';
import { Random } from 'meteor/random';
import { StoredEffectSchema } from '/imports/api/properties/Effects.js';
let BuffSchema = new SimpleSchema({
@@ -42,6 +43,11 @@ let StoredBuffWithIdSchema = new SimpleSchema({
_id: {
type: String,
regEx: SimpleSchema.RegEx.Id,
autoValue(){
if (!this.isSet){
return Random.id();
}
},
},
}).extend(StoredBuffSchema);