I don't think it's a bug *per se*, but it is unintuitive.

>From tiddlywiki.com

As long as the value of the field is unique (i.e. has not been encountered 
> before), the title is appended to the output.


and

If a tiddler does not contain field F, it is treated as if the value of the 
> field were empty.
>


Now use filter 

[all[tiddlers]limit[1]]

You'll see that $:/library/sjcl.js 
<https://tiddlywiki.com/#%24%3A%2Flibrary%2Fsjcl.js> is the first item on 
the list.

So .... when "each" sees the first item in the list tiddlers, it looks at 
the field "color" in $:/library/sjcl.js. There is no field "color". So it 
saves the "" value on it's list of values that it has seen, and appends 
$:/library/sjcl.js 

to the output list.

If you delete $:/library/sjcl.js, you'll see that now "each" returns 
$:/boot/bootprefix.js, 
which is the next tiddler at tiddlywiki.com.

In real use, you would usually be using "each" in conjunction with "get" or 
some other filter, so this would not be a problem.

HTH





On Sunday, December 8, 2019 at 11:26:39 AM UTC-8, Mohammad wrote:
>
> On https://tiddlywiki.com/#each%20Operator%20(Examples)
> Look at the first example
>
> [each[color]]
>
> The output result show
>
> $:/library/sjcl.js <https://tiddlywiki.com/#%24%3A%2Flibrary%2Fsjcl.js>
>
> But it has no color field!
>
> --Mohammad
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c01b544f-12ae-4ae3-929f-8a387c2ded78%40googlegroups.com.

Reply via email to