File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ class Scratch3LooksBlocks {
256256 }
257257
258258 // Limit the length of the string.
259- text = String ( text ) . substr ( 0 , Scratch3LooksBlocks . SAY_BUBBLE_LIMIT ) ;
259+ text = Cast . toString ( text ) . substr ( 0 , Scratch3LooksBlocks . SAY_BUBBLE_LIMIT ) ;
260260
261261 return text ;
262262 }
@@ -395,7 +395,7 @@ class Scratch3LooksBlocks {
395395 target . setCostume ( optZeroIndex ? requestedCostume : requestedCostume - 1 ) ;
396396 } else {
397397 // Strings should be treated as costume names, where possible
398- const costumeIndex = target . getCostumeIndexByName ( requestedCostume . toString ( ) ) ;
398+ const costumeIndex = target . getCostumeIndexByName ( Cast . toString ( requestedCostume ) ) ;
399399
400400 if ( costumeIndex !== - 1 ) {
401401 target . setCostume ( costumeIndex ) ;
@@ -429,7 +429,7 @@ class Scratch3LooksBlocks {
429429 stage . setCostume ( optZeroIndex ? requestedBackdrop : requestedBackdrop - 1 ) ;
430430 } else {
431431 // Strings should be treated as backdrop names where possible
432- const costumeIndex = stage . getCostumeIndexByName ( requestedBackdrop . toString ( ) ) ;
432+ const costumeIndex = stage . getCostumeIndexByName ( Cast . toString ( requestedBackdrop ) ) ;
433433
434434 if ( costumeIndex !== - 1 ) {
435435 stage . setCostume ( costumeIndex ) ;
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ class ConstantInput {
177177 }
178178
179179 asString ( ) {
180- return `"${ sanitize ( '' + this . constantValue ) } "` ;
180+ return `"${ sanitize ( '' + this . constantValue ) } "` ; // Should this be updated to use "Cast.toString"?
181181 }
182182
183183 asBoolean ( ) {
You can’t perform that action at this time.
0 commit comments