GitHub files page error #114

Closed
opened 2025-10-31 17:05:57 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @shreyas1599 on GitHub (Feb 1, 2021).

I noticed this a while back. Forgot to get to it. Opening an issue in case I forget again.

Screenshot_20210201-205829.png

Originally created by @shreyas1599 on GitHub (Feb 1, 2021). I noticed this a while back. Forgot to get to it. Opening an issue in case I forget again. ![Screenshot_20210201-205829.png](https://user-images.githubusercontent.com/28999492/106479718-a1797980-64d0-11eb-8598-2ce14a061cfa.png)
Author
Owner

@shreyas1599 commented on GitHub (Feb 2, 2021):

This seems to be a problem of HighlightView. This is the offending line. When patch is null as is the case with the above screenshot, the error occurs.

@shreyas1599 commented on GitHub (Feb 2, 2021): This seems to be a problem of `HighlightView`. [This](https://github.com/git-touch/highlight/blob/251505aae568e95ad941e023c110495fa5ad0a16/flutter_highlight/lib/flutter_highlight.dart#L37) is the offending line. When `patch` is null as is the case with the above screenshot, the error occurs.
Author
Owner

@shreyas1599 commented on GitHub (Feb 2, 2021):

I can catch it in files_item.dart itself but I think it would be better for the package to handle null.

@shreyas1599 commented on GitHub (Feb 2, 2021): I can catch it in `files_item.dart` itself but I think it would be better for the package to handle null.
Author
Owner

@shreyas1599 commented on GitHub (Feb 2, 2021):

I'm thinking of replacing this line with patch ?? "No text to be shown here" or should I just leave it as an empty string. I think the first option is better because github returns a null patch only if the file has binary data. What do you think @pd4d10 ?

@shreyas1599 commented on GitHub (Feb 2, 2021): I'm thinking of replacing [this line](https://github.com/git-touch/git-touch/blob/918d0f3971b80fba411143a6bf1d3705eb1e4abb/lib/widgets/files_item.dart#L44) with `patch ?? "No text to be shown here"` or should I just leave it as an empty string. I think the first option is better because github returns a null patch only if the file has binary data. What do you think @pd4d10 ?
Author
Owner

@pd4d10 commented on GitHub (Feb 2, 2021):

OK. I have no strong preference for this, as long as it is easy to understand for users.

@pd4d10 commented on GitHub (Feb 2, 2021): OK. I have no strong preference for this, as long as it is easy to understand for users.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/git-touch#114