mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 21:04:16 +02:00
Avoid default type on name and item create dialogs (#1958)
This commit is contained in:
parent
318d00b47d
commit
98ce49b928
3 changed files with 36 additions and 0 deletions
|
|
@ -82,6 +82,7 @@ export default class DHItem extends foundry.documents.Item {
|
|||
/** @inheritdoc */
|
||||
static async createDialog(data = {}, createOptions = {}, options = {}) {
|
||||
const { folders, types, template, context = {}, ...dialogOptions } = options;
|
||||
dialogOptions.classes = [options.classes ?? [], 'item-create'].flat(); // handled in hook
|
||||
|
||||
if (types?.length === 0) {
|
||||
throw new Error('The array of sub-types to restrict to must not be empty.');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue