Skip to content

Commit

Permalink
fixed naming a custom block category to a JS property such as "constr…
Browse files Browse the repository at this point in the history
…uctor"
  • Loading branch information
jmoenig committed Oct 13, 2024
1 parent e239cf0 commit 6770614
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
* **Notable Fixes:**
* only bind rings that replace list items to the list as environment if they are referred to by a non-numerical index (OOP 2.0)
* fixed #3403 editing a primitive and changing a default input
* fixed naming a custom block category to a JS property such as "constructor"

### 2024-09-13
* objects: fixed naming a custom block category to a JS property such as "constructor"

### 2024-09-12
* threads: only bind rings replaced in a list to the list as environment if they are referred to by a non-numerical index (OOP 2.0)
Expand Down
2 changes: 1 addition & 1 deletion snap.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<script src="src/widgets.js?version=2024-07-24"></script>
<script src="src/blocks.js?version=2024-10-11"></script>
<script src="src/threads.js?version=2024-10-12"></script>
<script src="src/objects.js?version=2024-10-12"></script>
<script src="src/objects.js?version=2024-10-13"></script>
<script src="src/scenes.js?version=2024-05-28"></script>
<script src="src/gui.js?version=2024-10-12"></script>
<script src="src/paint.js?version=2023-05-24"></script>
Expand Down
6 changes: 4 additions & 2 deletions src/objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ CustomBlockDefinition, exportEmbroidery*/

/*jshint esversion: 11*/

modules.objects = '2024-October-12';
modules.objects = '2024-October-13';

var SpriteMorph;
var StageMorph;
Expand Down Expand Up @@ -4145,7 +4145,9 @@ SpriteMorph.prototype.makeBlock = function () {
};

SpriteMorph.prototype.getPrimitiveTemplates = function (category) {
var blocks = this.primitivesCache[category];
var blocks = Object.hasOwn(this.primitivesCache, category) ?
this.primitivesCache[category]
: null;
if (!blocks) {
blocks = this.blockTemplates(category);
if (this.isCachingPrimitives) {
Expand Down

0 comments on commit 6770614

Please sign in to comment.