microsoft / jacdac

Device and service catalogs for Jacdac.
https://aka.ms/jacdac
Creative Commons Attribution 4.0 International
66 stars 25 forks source link

it4generator asserting when moving a block #414

Closed tballmsft closed 3 years ago

tballmsft commented 3 years ago

when you pick up a block and move it in blockly, debug assert raised here in it4generator.

        } else {
            const def = serviceBlocks.find(def => def.type === type)
            assert(!!def)

The generator shouldn't be run when moving a block.

tballmsft commented 3 years ago

Error: Assertion failed at assert (utils.ts:387) at eval (VM24426 it4generator.ts:268) at Array.map () at workspaceJSONToIT4Program (VM24426 it4generator.ts:250) at eval (VM24381 VMBlockEditor.tsx:151) at invokePassiveEffectCreate (react-dom.development.js:23488) at HTMLUnknownElement.callCallback (react-dom.development.js:3946) at Object.invokeGuardedCallbackDev (react-dom.development.js:3995) at invokeGuardedCallback (react-dom.development.js:4057) at flushPassiveEffectsImpl (react-dom.development.js:23575)

pelikhan commented 3 years ago

Fixed by https://github.com/microsoft/jacdac-docs/commit/cb02e269a5872d6cf0cb37d442d0b47ac60a8551