changed result for FIND to empty instead of false if none is found

pull/95/head
jmoenig 2020-05-27 08:23:04 +02:00
rodzic c6f6e37100
commit b62fd6f470
2 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -8,7 +8,7 @@
<script type="text/javascript" src="src/symbols.js?version=2020-05-06"></script>
<script type="text/javascript" src="src/widgets.js?version=2020-05-06"></script>
<script type="text/javascript" src="src/blocks.js?version=2020-05-25"></script>
<script type="text/javascript" src="src/threads.js?version=2020-05-24"></script>
<script type="text/javascript" src="src/threads.js?version=2020-05-27"></script>
<script type="text/javascript" src="src/objects.js?version=2020-05-18"></script>
<script type="text/javascript" src="src/gui.js?version=2020-05-26"></script>
<script type="text/javascript" src="src/paint.js?version=2020-05-17"></script>

Wyświetl plik

@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy, Map,
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, Color,
TableFrameMorph, ColorSlotMorph, isSnapObject, newCanvas, Symbol, SVG_Costume*/
modules.threads = '2020-May-24';
modules.threads = '2020-May-27';
var ThreadManager;
var Process;
@ -2657,7 +2657,7 @@ Process.prototype.reportFindFirst = function (predicate, list) {
this.context.accumulator.source.cdr();
}
if (this.context.accumulator.remaining === 0) {
this.returnValueToParentContext(false);
this.returnValueToParentContext('');
return;
}
index = this.context.accumulator.idx;
@ -2678,7 +2678,7 @@ Process.prototype.reportFindFirst = function (predicate, list) {
}
}
if (this.context.accumulator.idx === list.length()) {
this.returnValueToParentContext(false);
this.returnValueToParentContext('');
return;
}
this.context.accumulator.idx += 1;