fix(sheets): use foundry.utils.duplicate instead of global duplicate

Foundry V11+ no longer exposes 'duplicate' as a global function.
It must be accessed via foundry.utils.duplicate.

Fixed in:
- actor-sheet.mjs:140
- creature-sheet.mjs:148

This resolves the ReferenceError: duplicate is not defined error
when creating items on actor sheets.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-06-04 23:25:11 +02:00
parent dfc9b823a4
commit 1b66c24258
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ export class VermineCreatureSheet extends VermineActorSheet {
// Get the type of item to create.
const type = header.dataset.type;
// Grab any data associated with this control.
const data = duplicate(header.dataset);
const data = foundry.utils.duplicate(header.dataset);
// Initialize a default name.
// const name = `New ${type.capitalize()}`;
const name = game.i18n.localize('ITEMS.new_' + type);