Trim whitespace in "display [♡]" input field (#1598)

This commit is contained in:
Kreg Hanning 2018-09-25 10:47:33 -04:00 committed by Eric Rosenbaum
parent b063226fd7
commit b81ba599db

View file

@ -783,7 +783,7 @@ class Scratch3MicroBitBlocks {
* @return {Promise} - a Promise that resolves after a tick.
*/
displaySymbol (args) {
const symbol = cast.toString(args.MATRIX);
const symbol = cast.toString(args.MATRIX).replace(/\s/g, '');
const reducer = (accumulator, c, index) => {
const value = (c === '0') ? accumulator : accumulator + Math.pow(2, index);
return value;