[#35] Use different ID attributes for sidebar documents depending on foundry version.

This commit is contained in:
fyorl 2021-12-13 17:14:53 +00:00
parent e966775723
commit 84562bd9c2
No known key found for this signature in database
GPG key ID: 3A4E57DAE36AC3C4
3 changed files with 15 additions and 12 deletions

View file

@ -532,7 +532,7 @@ export class EntitySheetHelper {
}
// Render the document creation form
const useEntity = foundry.utils.isNewerVersion("9", game.version ?? game.data.version);
const useEntity = game.worldbuilding.useEntity;
const template = `templates/sidebar/${useEntity ? "entity" : "document" }-create.html`;
const html = await renderTemplate(template, {
name: data.name || game.i18n.format("DOCUMENT.New", {type: label}),