From 5ea2a0af9c09635533464b2d1cb99a92f757fb9f Mon Sep 17 00:00:00 2001 From: jmoenig Date: Tue, 1 Dec 2020 13:41:37 +0100 Subject: [PATCH] made sure map() doesn't mutate internal list linked-ness --- HISTORY.md | 1 + snap.html | 2 +- src/lists.js | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 85a8f313..45a1ca18 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -24,6 +24,7 @@ * blocks: made pen attributes menus static * blocks: made sensing attributes menus largely static * threads: changed reportVideo() to be hyper-monadic +* lists: made sure map() doesn't mutate internal list linked-ness ### 2020-11-30 * threads: keep internal linked-list organization intact for hyperblocks diff --git a/snap.html b/snap.html index 3d57e7df..244bc49a 100755 --- a/snap.html +++ b/snap.html @@ -13,7 +13,7 @@ - + diff --git a/src/lists.js b/src/lists.js index 07e314e2..9ca55cd2 100644 --- a/src/lists.js +++ b/src/lists.js @@ -63,7 +63,7 @@ MorphicPreferences, TableDialogMorph, SpriteBubbleMorph, SpeechBubbleMorph, TableFrameMorph, TableMorph, Variable, isSnapObject, Costume, contains, detect, ZERO, WHITE*/ -modules.lists = '2020-July-01'; +modules.lists = '2020-December-01'; var List; var ListWatcherMorph; @@ -211,7 +211,7 @@ List.prototype.clear = function () { List.prototype.map = function(callback) { return new List( - this.asArray().map(callback) + this.itemsArray().map(callback) ); };