Fix weapon sheet
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
export default class OathHammerUtils {
|
||||
static registerHandlebarsHelpers() {
|
||||
Handlebars.registerHelper("ifThen", (condition, trueVal, falseVal) => condition ? trueVal : falseVal)
|
||||
Handlebars.registerHelper("includes", (collection, value) => {
|
||||
if (!collection) return false
|
||||
if (collection instanceof Set) return collection.has(value)
|
||||
if (Array.isArray(collection)) return collection.includes(value)
|
||||
return false
|
||||
})
|
||||
Handlebars.registerHelper("capitalize", (str) => {
|
||||
if (typeof str !== "string") return str
|
||||
return str.charAt(0).toUpperCase() + str.slice(1)
|
||||
|
||||
Reference in New Issue
Block a user