Skip to content

Commit 6045d70

Browse files
authored
utilities: fix letters erroring if input string is a number (TurboWarp#2173)
1 parent 3daea52 commit 6045d70

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎extensions/utilities.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,10 @@
330330
}
331331

332332
letters({ STRING, START, END }) {
333-
return STRING.slice(Math.max(1, START) - 1, Math.min(STRING.length, END));
333+
return Scratch.Cast.toString(STRING).slice(
334+
Math.max(1, START) - 1,
335+
Math.min(STRING.length, END)
336+
);
334337
}
335338

336339
clamp({ INPUT, MIN, MAX }) {

0 commit comments

Comments
 (0)