diff --git a/HISTORY.md b/HISTORY.md index 2d392a67..07cd1c43 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -6,6 +6,8 @@ * "export block definition" including dependencies * hyperized "distance/direction to _" reporter primitive * new "Database" library operating on localstore +* **Notable Fixes:** + * changing the type of a custom block from reporter to command in the block editor changes the prototype instead of adding another one * **Translation Updates:** * Catalan, thanks, Joan! * Norwegian, thanks, Olav! @@ -13,7 +15,8 @@ ### 2020-09-04 * byob, blocks, objects: refactored scanning for message senders -* blocks: support scanning for message receivers from inside a block editor +* blocks: support scanning for message receivers from inside a block editor +* blocks: fixed changing the type of a custom block from reporter to command in the block editor ### 2020-09-03 * byob: experimental: Inspect & export dependencies for global custom blocks (shift-right-click for context menu) @@ -46,7 +49,7 @@ * show message senders / receivers from the blocks context menu, thanks, Bernat! ## 6.1.4: -* fixed "green flag" symbol size for embedded proects (for real ^^)= +* fixed "green flag" symbol size for embedded proects (for real ^^) ## 6.1.3: * **Notable Changes:** diff --git a/src/blocks.js b/src/blocks.js index 51a4b35e..ce15bb8b 100644 --- a/src/blocks.js +++ b/src/blocks.js @@ -456,7 +456,9 @@ SyntaxElementMorph.prototype.replaceInput = function (oldArg, newArg) { } replacement.parent = this; this.children[idx] = replacement; - if (oldArg instanceof ReporterBlockMorph && scripts) { + if (oldArg instanceof ReporterBlockMorph && scripts && + !oldArg.isPrototype + ) { if (!(oldArg instanceof RingMorph) || (oldArg instanceof RingMorph && oldArg.contents())) { scripts.add(oldArg);