[blockly] Fix Thing "is enabled" code generation (#2588)

Thing::enabled produces undefined because enabled is no valid field.
Using Thing::isEnabled instead.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
pull/2592/head
stefan-hoehn 2024-05-26 12:37:03 +02:00 committed by GitHub
parent 21b669e3d5
commit df8ef84ff0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ export default function defineOHBlocks (f7, isGraalJs) {
init: function () {
const block = this
const dropdown = new Blockly.FieldDropdown(
[['UID', 'uid'], ['label', 'label'], ['status', 'status'], ['status info', 'statusInfo'], ['location', 'location'], ['is enabled', 'enabled'], ['thing type UID', 'thingTypeUID'], ['bridge UID', 'bridgeUID']],
[['UID', 'uid'], ['label', 'label'], ['status', 'status'], ['status info', 'statusInfo'], ['location', 'location'], ['is enabled', 'isEnabled'], ['thing type UID', 'thingTypeUID'], ['bridge UID', 'bridgeUID']],
function (newMode) {
block._updateType(newMode)
})