From 78c67a4fd6d91a4a6a08950b184d440d7ea5eb3d Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Wed, 23 Feb 2022 11:07:02 +0200 Subject: [PATCH] Fixed incorrect use of parser toString in places --- app/imports/api/creature/log/CreatureLogs.js | 2 +- app/imports/parser/parseTree/index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/imports/api/creature/log/CreatureLogs.js b/app/imports/api/creature/log/CreatureLogs.js index 9ada6cf2..1cab572f 100644 --- a/app/imports/api/creature/log/CreatureLogs.js +++ b/app/imports/api/creature/log/CreatureLogs.js @@ -186,7 +186,7 @@ const logRoll = new ValidatedMethod({ let {result: rolled} = resolve('roll', compiled, creature.variables, context); let rolledString = toString(rolled); if (rolledString !== compiledString) logContent.push({ - value: rolled.toString() + value: rolledString }); let {result} = resolve('reduce', rolled, creature.variables, context); let resultString = toString(result); diff --git a/app/imports/parser/parseTree/index.js b/app/imports/parser/parseTree/index.js index 71fd151b..64f9945c 100644 --- a/app/imports/parser/parseTree/index.js +++ b/app/imports/parser/parseTree/index.js @@ -31,7 +31,7 @@ const indexNode = { } } else if (fn === 'reduce'){ if (array.parseType !== 'array'){ - const message = `Can not get the index of a non-array node: ${node.array.toString()} = ${array.toString()}` + const message = `Can not get the index of a non-array node: ${toString(node.array)} = ${toString(array)}` context.error(message); return { result: error.create({ @@ -41,7 +41,7 @@ const indexNode = { context, }; } else if (!index.isInteger){ - const message = `${array.toString()} is not an integer index of the array` + const message = `${toString(array)} is not an integer index of the array` context.error(message); return { result: error.create({