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

fix: nil check for setup config #126

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

IfanTsai
Copy link
Contributor

@IfanTsai IfanTsai commented Aug 8, 2024

Check nil for user setup config. If user do not pass config for setup likes require("rsync").setup(), the error will occurs

E5108: Error executing lua .../.local/share/nvim/lazy/rsync.nvim/lua/rsync/config.lua:26: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
        [C]: in function 'pairs'
        .../.local/share/nvim/lazy/rsync.nvim/lua/rsync/config.lua:26: in function 'apply_config'
        .../.local/share/nvim/lazy/rsync.nvim/lua/rsync/init.lua:43: in function 'setup'
        .../.config/nvim/lua/usr/init.lua:67: in main chunk
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk

Copy link
Owner

@OscarCreator OscarCreator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@OscarCreator OscarCreator merged commit 70be22f into OscarCreator:master Aug 8, 2024
4 of 6 checks passed
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.

2 participants