Fixed item.type logic

This commit is contained in:
WBHarry 2025-07-15 22:23:24 +02:00
parent e11c1ad972
commit 3232e7ed65

View file

@ -21,9 +21,9 @@ export default class DhHotbar extends Hotbar {
setupHooks() { setupHooks() {
Hooks.on('hotbarDrop', (bar, data, slot) => { Hooks.on('hotbarDrop', (bar, data, slot) => {
if (['Item'].includes(data.type)) { if (data.type === 'Item') {
const item = foundry.utils.fromUuidSync(data.uuid); const item = foundry.utils.fromUuidSync(data.uuid);
if (typeof item === 'string') return true; if (item.uuid.startsWith('Compendium') || !item.isOwned || !item.isOwner) return true;
switch (item.type) { switch (item.type) {
case 'ancestry': case 'ancestry':