From 267ebcb312cf4e37df29aebf62ed704067d27e91 Mon Sep 17 00:00:00 2001 From: player-03 Date: Mon, 11 Nov 2019 13:38:51 -0500 Subject: [PATCH] [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. --- Fate Core v2/fate.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Fate Core v2/fate.html b/Fate Core v2/fate.html index e121bc9bce..a3ea56d47c 100644 --- a/Fate Core v2/fate.html +++ b/Fate Core v2/fate.html @@ -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"); - \ No newline at end of file + const isNullOrWhitespace = (attr) => !(attr && (attr.trim ? attr.trim() && attr.trim() != "0" : attr > 0)); +