Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datawidget: Add check if tiddler exists for $filter attribute to avoide rsod #8333

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

pmario
Copy link
Contributor

@pmario pmario commented Jul 3, 2024

This PR fixes

It adds the same if (tiddler) check, that is used for the $tiddler attribute.

@btheado please check the preview, once it is built

Copy link

vercel bot commented Jul 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
tiddlywiki5 ✅ Ready (Inspect) Visit Preview Jul 3, 2024 11:12am

@btheado
Copy link
Contributor

btheado commented Jul 3, 2024

Thanks @pmario it does fix the RSOD. I wonder if the behavior of <$data $filter="MissingTiddler1 MissingTiddler2"/> should be more similar to <$data title="MissingTiddler1"/> <$data title="MissingTiddler2"/>.

With your implementation the result is [], but it seems more consistent to me if it returns [ { "title": "MissingTiddler1" }, { "title": "MissingTiddler2" } ]

Probably that is debatable, but either way, we should have test cases to document the expected behavior.

@pmario
Copy link
Contributor Author

pmario commented Jul 4, 2024

Both $tiddler=missing and $filter=missing show the same result now. So I think that is consistent

image

@btheado
Copy link
Contributor

btheado commented Jul 4, 2024

Both $tiddler=missing and $filter=missing show the same result

Thanks for pointing that out. That changes my perspective. I agree those two should be consistent with each other.

@Jermolene
Copy link
Owner

Thanks @pmario @btheado

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants