Skip to content

Commit

Permalink
got out working for values in int and enum domain
Browse files Browse the repository at this point in the history
  • Loading branch information
N-J-Martin committed Mar 9, 2024
1 parent a0e90b2 commit 2d9ce05
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ async function getSolution() {
blockOut.createVariable(v);
let varBlock = blockOut.newBlock('variables_set');
varBlock.setFieldValue(blockOut.getVariable(v).getId(), 'VAR');
console.log(typeof(sol[v]));
//console.log(typeof(sol[v]));
let valueBlock;
switch (typeof(sol[v])){
case("bigint"):
Expand All @@ -196,9 +196,10 @@ async function getSolution() {
valueBlock.setFieldValue(sol[v], "NUM");
break;
}
case("object"): {
case("string"): {
console.log("enum");
valueBlock = null;
valueBlock = blockOut.newBlock('text');
valueBlock.setFieldValue(sol[v], "TEXT");
break;
}
default:{
Expand Down

0 comments on commit 2d9ce05

Please sign in to comment.