mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-11 10:39:56 -05:00
Trim whitespace in "display [♡]" input field (#1598)
This commit is contained in:
parent
b063226fd7
commit
b81ba599db
1 changed files with 1 additions and 1 deletions
|
@ -783,7 +783,7 @@ class Scratch3MicroBitBlocks {
|
||||||
* @return {Promise} - a Promise that resolves after a tick.
|
* @return {Promise} - a Promise that resolves after a tick.
|
||||||
*/
|
*/
|
||||||
displaySymbol (args) {
|
displaySymbol (args) {
|
||||||
const symbol = cast.toString(args.MATRIX);
|
const symbol = cast.toString(args.MATRIX).replace(/\s/g, '');
|
||||||
const reducer = (accumulator, c, index) => {
|
const reducer = (accumulator, c, index) => {
|
||||||
const value = (c === '0') ? accumulator : accumulator + Math.pow(2, index);
|
const value = (c === '0') ? accumulator : accumulator + Math.pow(2, index);
|
||||||
return value;
|
return value;
|
||||||
|
|
Loading…
Reference in a new issue