02aabbea36
The createActor hook was calling actor.setFlag() immediately, which triggered updateActor -> prepareData -> prepareEmbeddedDocuments() -> applyActiveEffects(). Since the actor had already gone through data preparation during creation, the effects had already been applied, causing the 'phase already completed' error. Solution: Use setTimeout(..., 0) to defer the flag setting until after the current preparation cycle is complete. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>