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:
@@ -137,7 +137,7 @@ export class VermineActorSheet extends ActorSheet {
|
||||
// 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);
|
||||
|
||||
Reference in New Issue
Block a user