mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-08-30 03:40:32 +00:00
[Fate Core v2] Fix runtime errors (#5655)
`isNullOrWhitespace()` expects a string but sometimes receives a number, so I added a check for that. Also, `tim()` is clearly a typo.
This commit is contained in:
@@ -1862,7 +1862,7 @@
|
||||
newRowAttrs["repeating_stress_" + newRowId + "_usable"] = stressMax;
|
||||
|
||||
if (!isNullOrWhitespace(skill)) {
|
||||
newRowAttrs["repeating_stress_" + newRowId + "_skill"] = skill.tim();
|
||||
newRowAttrs["repeating_stress_" + newRowId + "_skill"] = skill.trim();
|
||||
newRowAttrs["repeating_stress_" + newRowId + "_bound"] = 1;
|
||||
}
|
||||
|
||||
@@ -2448,5 +2448,5 @@
|
||||
});
|
||||
}
|
||||
|
||||
const isNullOrWhitespace = (attr) => !(attr && attr.trim() && attr.trim() != "0");
|
||||
</script>
|
||||
const isNullOrWhitespace = (attr) => !(attr && (attr.trim ? attr.trim() && attr.trim() != "0" : attr > 0));
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user