From 73f0667ca2a5971ea4afb388f168b7d2ad27e7ad Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Tue, 6 Jul 2021 08:20:01 +1000 Subject: [PATCH] Fix crash on dice pickup with low frame rates --- src/helpers/dice.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/helpers/dice.js b/src/helpers/dice.js index d30cab8..4a8c6d1 100644 --- a/src/helpers/dice.js +++ b/src/helpers/dice.js @@ -18,7 +18,11 @@ export function getDiceInstanceRoll(instance) { highestLocator = locator; } } - return parseInt(highestLocator.name.slice(12)); + if (highestLocator) { + return parseInt(highestLocator.name.slice(12)); + } else { + return 0; + } } /**