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

Allow passing nil as name to hs.pasteboard.callbackWhenChanged #3616

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

Perlence
Copy link
Contributor

The issue was that calling hs.pasteboard.callbackWhenChanged(nil, 1, function() end) raised "callback must be a function". This is because ipairs stops iterating the varargs table on the first nil element, so the for-loop body is not executed.

The issue was that calling `hs.pasteboard.callbackWhenChanged(nil, 1, function() end)` raised "callback must be a function". This is because ipairs stops iterating the varargs table on the first nil element, so the for-loop body is not executed.
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This pull request does not contain a valid label. Please add one of the following labels: ['pr-fix', 'pr-change', 'pr-feature', 'pr-maintenance']

@cmsj cmsj merged commit 3e815df into Hammerspoon:master Aug 5, 2024
1 check passed
@cmsj cmsj added the pr-fix Pull Request implementing a bug fix label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-fix Pull Request implementing a bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants