Skip to content

Commit

Permalink
upd: use number prop in do block
Browse files Browse the repository at this point in the history
  • Loading branch information
KermanX committed Nov 11, 2023
1 parent eda3492 commit 4385946
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/northstar/src/blocks/special/do.r.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,14 @@ export class DoBlock extends RectBlock {
return [
{
name: "number",
type: "text",
type: "number",
min: 2,
max: 5,
getVal: () => {
return this.thenNum.toString();
return this.thenNum;
},
setVal: val => {
const length = parseInt(val);
this.thenNum = isNaN(length) ? 0 : length;
this.thenNum = val;
},
},
{
Expand Down

0 comments on commit 4385946

Please sign in to comment.