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

Return nothing if no change? renderNothingWhenEmpty not working #212

Closed
rchancey opened this issue Apr 25, 2019 · 3 comments
Closed

Return nothing if no change? renderNothingWhenEmpty not working #212

rchancey opened this issue Apr 25, 2019 · 3 comments

Comments

@rchancey
Copy link

I am using the flag renderNothingWhenEmpty and expected to get an empty string.. but it still returns a diff. Also somehow it says changed when there are no changes.

I don't want to display anything for files that have no change.. is there a way to determine that from the result?
Screen Shot 2019-04-25 at 5 51 16 PM

@rchancey
Copy link
Author

I ended up with.. if (diffHtml.indexOf('File without changes') >= 0) continue;.. but is there a better way?

@rtfpessoa
Copy link
Owner

@rchancey can you provide an example of a diff with that result?

@rtfpessoa
Copy link
Owner

Closing for inactivity. Let me know if you still need help.

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

No branches or pull requests

2 participants