From a7898bfe4ba8e3cdedbe70cb8caad6fa65cd5975 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Sun, 31 Jan 2021 19:42:49 +0200 Subject: [PATCH] Fixed props not having a default array for embedded calculations --- app/imports/api/properties/Actions.js | 4 +++- app/imports/api/properties/Attributes.js | 1 + app/imports/api/properties/Buffs.js | 1 + app/imports/api/properties/Containers.js | 1 + app/imports/api/properties/Features.js | 2 ++ app/imports/api/properties/Items.js | 1 + app/imports/api/properties/Notes.js | 2 ++ app/imports/api/properties/SpellLists.js | 1 + .../ui/properties/viewers/shared/PropertyDescription.vue | 2 +- 9 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/imports/api/properties/Actions.js b/app/imports/api/properties/Actions.js index e2a0edc1..0cd20fc6 100644 --- a/app/imports/api/properties/Actions.js +++ b/app/imports/api/properties/Actions.js @@ -119,12 +119,14 @@ let ActionSchema = new SimpleSchema({ const ComputedOnlyActionSchema = new SimpleSchema({ summaryCalculations: { type: Array, + defaultValue: [], maxCount: 32, }, 'summaryCalculations.$': InlineComputationSchema, - + descriptionCalculations: { type: Array, + defaultValue: [], maxCount: 32, }, 'descriptionCalculations.$': InlineComputationSchema, diff --git a/app/imports/api/properties/Attributes.js b/app/imports/api/properties/Attributes.js index aa60982f..bbb1de0f 100644 --- a/app/imports/api/properties/Attributes.js +++ b/app/imports/api/properties/Attributes.js @@ -78,6 +78,7 @@ let AttributeSchema = new SimpleSchema({ let ComputedOnlyAttributeSchema = new SimpleSchema({ descriptionCalculations: { type: Array, + defaultValue: [], maxCount: 32, }, 'descriptionCalculations.$': InlineComputationSchema, diff --git a/app/imports/api/properties/Buffs.js b/app/imports/api/properties/Buffs.js index 927134ea..9fa7ba01 100644 --- a/app/imports/api/properties/Buffs.js +++ b/app/imports/api/properties/Buffs.js @@ -33,6 +33,7 @@ let BuffSchema = new SimpleSchema({ let ComputedOnlyBuffSchema = new SimpleSchema({ descriptionCalculations: { type: Array, + defaultValue: [], maxCount: 32, }, 'descriptionCalculations.$': InlineComputationSchema, diff --git a/app/imports/api/properties/Containers.js b/app/imports/api/properties/Containers.js index 91217956..9b860ebb 100644 --- a/app/imports/api/properties/Containers.js +++ b/app/imports/api/properties/Containers.js @@ -36,6 +36,7 @@ let ContainerSchema = new SimpleSchema({ const ComputedOnlyContainerSchema = new SimpleSchema({ descriptionCalculations: { type: Array, + defaultValue: [], maxCount: 32, }, 'descriptionCalculations.$': InlineComputationSchema, diff --git a/app/imports/api/properties/Features.js b/app/imports/api/properties/Features.js index 59f9a274..4ec08da3 100644 --- a/app/imports/api/properties/Features.js +++ b/app/imports/api/properties/Features.js @@ -19,12 +19,14 @@ let ComputedOnlyFeatureSchema = new SimpleSchema({ summaryCalculations: { type: Array, + defaultValue: [], maxCount: 32, }, 'summaryCalculations.$': InlineComputationSchema, descriptionCalculations: { type: Array, + defaultValue: [], maxCount: 32, }, 'descriptionCalculations.$': InlineComputationSchema, diff --git a/app/imports/api/properties/Items.js b/app/imports/api/properties/Items.js index 5978847f..109164d4 100644 --- a/app/imports/api/properties/Items.js +++ b/app/imports/api/properties/Items.js @@ -57,6 +57,7 @@ const ItemSchema = new SimpleSchema({ let ComputedOnlyItemSchema = new SimpleSchema({ descriptionCalculations: { type: Array, + defaultValue: [], maxCount: 32, }, 'descriptionCalculations.$': InlineComputationSchema, diff --git a/app/imports/api/properties/Notes.js b/app/imports/api/properties/Notes.js index 89d392bb..7aa126f7 100644 --- a/app/imports/api/properties/Notes.js +++ b/app/imports/api/properties/Notes.js @@ -16,12 +16,14 @@ let ComputedOnlyNoteSchema = new SimpleSchema({ summaryCalculations: { type: Array, + defaultValue: [], maxCount: 32, }, 'summaryCalculations.$': InlineComputationSchema, descriptionCalculations: { type: Array, + defaultValue: [], maxCount: 32, }, 'descriptionCalculations.$': InlineComputationSchema, diff --git a/app/imports/api/properties/SpellLists.js b/app/imports/api/properties/SpellLists.js index b9c0560b..1ff0f39e 100644 --- a/app/imports/api/properties/SpellLists.js +++ b/app/imports/api/properties/SpellLists.js @@ -28,6 +28,7 @@ let SpellListSchema = new SimpleSchema({ const ComputedOnlySpellListSchema = new SimpleSchema({ descriptionCalculations: { type: Array, + defaultValue: [], maxCount: 32, }, 'descriptionCalculations.$': InlineComputationSchema, diff --git a/app/imports/ui/properties/viewers/shared/PropertyDescription.vue b/app/imports/ui/properties/viewers/shared/PropertyDescription.vue index d68eb51c..0aed6cd8 100644 --- a/app/imports/ui/properties/viewers/shared/PropertyDescription.vue +++ b/app/imports/ui/properties/viewers/shared/PropertyDescription.vue @@ -8,7 +8,7 @@