Skip to content
Snippets Groups Projects
Commit 4a71cd99 authored by sjhuang26's avatar sjhuang26
Browse files

Made logic more consistent with Scratch 2

parent c0052b04
Branches
Tags
No related merge requests found
......@@ -37,7 +37,7 @@ export default function ({id, spriteName, index, opcode, params, value, x, y}) {
if (isUndefined(y)) y = PADDING + (index * (PADDING + MONITOR_HEIGHT));
// If value is a number, round it to six decimal places
if (!isNaN(value)) {
if (typeof value === "number" || (typeof value === "string" && String(parseFloat(value)) === value)) {
value = Number(Number(value).toFixed(6));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment