[#56] Fix issue with actors and items being created with the base document type.

This commit is contained in:
Kim Mantas 2023-06-01 16:56:35 +01:00
parent 2bd28e939d
commit 5d776f8056
No known key found for this signature in database
GPG key ID: 3A4E57DAE36AC3C4

View file

@ -521,7 +521,7 @@ export class EntitySheetHelper {
// Identify the template Actor types // Identify the template Actor types
const collection = game.collections.get(this.documentName); const collection = game.collections.get(this.documentName);
const templates = collection.filter(a => a.getFlag("worldbuilding", "isTemplate")); const templates = collection.filter(a => a.getFlag("worldbuilding", "isTemplate"));
const defaultType = this.TYPES[0]; const defaultType = this.TYPES.filter(t => t !== CONST.BASE_DOCUMENT_TYPE)[0] ?? CONST.BASE_DOCUMENT_TYPE;
const types = { const types = {
[defaultType]: game.i18n.localize("SIMPLE.NoTemplate") [defaultType]: game.i18n.localize("SIMPLE.NoTemplate")
} }