Skip to content

Commit

Permalink
Add compatibility for v11
Browse files Browse the repository at this point in the history
  • Loading branch information
DFreds committed May 26, 2023
1 parent 36546de commit 221d9b8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"flags": {},
"version": "1.2.5",
"compatibility": {
"minimum": 10,
"verified": "10.291",
"maximum": 10
"minimum": 11,
"verified": "11.299",
"maximum": 11
},
"scripts": [],
"esmodules": ["./scripts/main.js"],
Expand Down
6 changes: 4 additions & 2 deletions scripts/droppable.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ export default class Droppable {
return;
}

if (data.documentName === 'Actor') {
const folder = fromUuidSync(data.uuid);

if (folder.type === 'Actor') {
this._handleActorFolder(data, event);
} else if (data.documentName === 'JournalEntry') {
} else if (folder.type === 'JournalEntry') {
this._handleJournalFolder(data, event);
} else {
errorCallback();
Expand Down
1 change: 1 addition & 0 deletions scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Hooks.once('setup', () => {
);
});

// TODO need to double check this works in v11 when it's updated
Hooks.on('3DCanvasConfig', (config) => {
config.INTERACTIONS.dropFunctions.Folder = async function (event, data) {
canvas.tokens.activate();
Expand Down

0 comments on commit 221d9b8

Please sign in to comment.