Skip to content

Commit

Permalink
[blockly] Fix UoM variable support (#1911)
Browse files Browse the repository at this point in the history
Fixes variable support for the blockly unit of measurement blocks which
did not work at all -> var defaults to item object.

Blockly cannot detect the type that is contained in a variable so we
expect an Item object.
This allows to iterate over a group of Item members which returns a list
of Item objects

Signed-off-by: Stefan Höhn <[email protected]>
  • Loading branch information
stefan-hoehn authored May 29, 2023
1 parent dab4630 commit a478359
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ function generateQuantityCode (block, inputName) {
code = `Quantity(${input})`
break
case 'oh_itemtype':
case '': // vars are expected to contain an item object
code = `${input}.quantityState`
break
case 'oh_item':
Expand Down

0 comments on commit a478359

Please sign in to comment.