diff --git a/changelog.md b/changelog.md index 65ae527..018ee14 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,9 @@ # Changelog +## 3.1.x folders +## 3.1.2 +- fix collision to better roll tables +## 3.1.1 +- css bug in some browsers ## 3.1.0 - add folder structure - ui redesign beavers recipe compendium add responsiveness @@ -11,7 +16,6 @@ - fix more then two tests - ui redesign crafting tab on actor - ui redesign chatMessage -- todo create tutorial video ## 3.0.x progress tracking and multiple tests ## 3.0.2 diff --git a/module.json b/module.json index b77decd..e0bbf90 100644 --- a/module.json +++ b/module.json @@ -2,7 +2,7 @@ "title": "Beaver's Crafting Module", "description": "A Crafting Module for DnD", "id": "beavers-crafting", - "version": "3.1.1", + "version": "3.1.2", "authors": [ { "name": "angryBeaver", diff --git a/package.json b/package.json index f5fe030..fe3dabe 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "beavers-crafting", "title": "Beaver's Crafting", - "version": "3.1.1", + "version": "3.1.2", "description": "Crafting", "devDir": "C:\\Users\\Riess\\AppData\\Local\\FoundryVTT\\Data\\modules", "#devDir": "C:\\data\\Data\\modules", diff --git a/src/main.js b/src/main.js index 6d75f47..1b00ff2 100644 --- a/src/main.js +++ b/src/main.js @@ -120,12 +120,8 @@ Hooks.once("beavers-system-interface.ready", async function(){ }); //fucking stupid handlebars !!! -Handlebars.registerHelper('hasKey', function (param1, key, options) { - if (param1[key]) { - return options.fn(this); - } - return options.inverse(this); -}); -Handlebars.registerHelper('isEmpty', function (object, options) { - return Object.keys(object).length === 0; +Handlebars.registerHelper('beavers-isEmpty', function (value, options) { + return value === undefined || + (value instanceof Object && Object.keys(value).length === 0) || + (value instanceof Array && value.length === 0) }); \ No newline at end of file diff --git a/templates/beavers-recipe.hbs b/templates/beavers-recipe.hbs index 9a19be2..77981b2 100644 --- a/templates/beavers-recipe.hbs +++ b/templates/beavers-recipe.hbs @@ -60,7 +60,7 @@