fvtt-fria-ligan / morkborg-foundry-vtt

An unoffical, community-supported system for playing MÖRK BORG on Foundry VTT.
Other
33 stars 18 forks source link

Console warning during Make Scvm #118

Closed mcglincy closed 2 years ago

mcglincy commented 3 years ago

Cannot initialize the effects EmbeddedCollection from source data which is not an Array

  | _initialize | @ | data.mjs:184
-- | -- | -- | --
  | DocumentData | @ | data.mjs:51
  | ItemData | @ | data.mjs:793
  | Document | @ | document.mjs:46
  | BaseItem | @ | documents.mjs:489
  | (anonymous) | @ | foundry.js:9199
  | Item | @ | foundry.js:14457
  | MBItem | @ | item.js:4
  | _initialize | @ | embedded-collection.mjs:68
  | EmbeddedCollection | @ | embedded-collection.mjs:53
  | _initialize | @ | data.mjs:187
  | _initialize | @ | data.mjs:194
  | DocumentData | @ | data.mjs:51
  | ActorData | @ | data.mjs:145
  | Document | @ | document.mjs:46
  | BaseActor | @ | documents.mjs:61
  | (anonymous) | @ | foundry.js:9199
  | Actor | @ | foundry.js:12113
  | MBActor | @ | actor.js:20
  | _preCreateDocumentArray | @ | foundry.js:8663
  | _createDocuments | @ | foundry.js:8603
  | create | @ | backend.mjs:96
  | async function (async) |   |  
  | create | @ | backend.mjs:93
  | createDocuments | @ | document.mjs:332
  | create | @ | document.mjs:431
  | create | @ | actor.js:55
  | createActorWithScvm | @ | scvmfactory.js:273
  | createScvm | @ | scvmfactory.js:12
  | async function (async) |   |  
  | createScvm | @ | scvmfactory.js:11
  | _onScvm | @ | scvm-dialog.js:90
  | async function (async) |   |  
  | _onScvm | @ | scvm-dialog.js:77
  | dispatch | @ | jquery.min.js:2
  | v.handle | @ | jquery.min.js:2
mcglincy commented 2 years ago

Fixed by creating an array of simplified data for the new actor's items, rather than a direct copy of items from compendiums (that have an effects field populated with an EmbeddedCollection (that causes the warning).