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

Bail out when null values are encountered #369

Merged
merged 2 commits into from
Mar 31, 2020
Merged

Bail out when null values are encountered #369

merged 2 commits into from
Mar 31, 2020

Conversation

src-code
Copy link
Contributor

When invalid classes are encountered such as P(a,0,c) which result in null values being generated for some args (they are not custom values), we need to short-circuit the processing of the rest of the values. Can't short-circuit a forEach loop, but can check for treeo.declarations being null before trying to reference it further.

Background - This issue came up because of a recent change to Marko templating system. Marko generates code that looks a little like Atomic classes, but is actually obfuscated function calls. Normally these would be ignored due to the lack of valid "values" in the string, but they recently switched away from serializing null to using a 0 value, which looks "valid" to Atomizer.

marko-js/marko#1535

@coveralls
Copy link

coveralls commented Mar 31, 2020

Coverage Status

Coverage remained the same at 100.0% when pulling 05744e3 on null-values into e41b540 on master.

@src-code src-code merged commit 39931fa into master Mar 31, 2020
@src-code src-code deleted the null-values branch March 31, 2020 21:23
@redonkulus
Copy link
Contributor

Thanks!

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.

3 participants