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

Splat when GHToggleThreads is run against a hunk with no thread / comments #45

Closed
joestringer opened this issue Jun 1, 2022 · 2 comments

Comments

@joestringer
Copy link
Contributor

I tried to use GHToggleThreads on a hunk I was viewing, without realizing that there are no existing comments / threads. Here's the splat:

Error executing Lua callback: /home/joe/.vim/bundle/gh.nvim/lua/litee/gh/pr/diff_view.lua:526: attempt to index field 'threads_by_line' (a nil value)                                                                                                                                       
stack traceback:                                                                                                                                                                                                                                                                            
        /home/joe/.vim/bundle/gh.nvim/lua/litee/gh/pr/diff_view.lua:526: in function 'toggle_threads'                                                                                                                                                                                       
        /home/joe/.vim/bundle/gh.nvim/lua/litee/gh/commands.lua:45: in function </home/joe/.vim/bundle/gh.nvim/lua/litee/gh/commands.lua:45> 
@ldelossa
Copy link
Owner

ldelossa commented Jun 1, 2022

Wow, I can't believe I haven't seen that one before. Should be an easy fix. I'll ping this with the commit.

@ldelossa
Copy link
Owner

ldelossa commented Jun 2, 2022

Fixed @joestringer

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