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

Fetch missing value again before throwing #20

Merged
merged 2 commits into from
Apr 11, 2024
Merged

Fetch missing value again before throwing #20

merged 2 commits into from
Apr 11, 2024

Conversation

fchorney
Copy link
Collaborator

If a SMXStage function requires info or config, we try to fetch it again first and if it's still missing then we'll throw an error.

sdk/smx.ts Outdated
setLightStrip(color: RGB): Promise<AckPacket> {
if (!this.info) throw new ReferenceError("this.info does not exist for stage. Can not set light strip");

async setLightStrip(color: RGB): Promise<AckPacket> {
Copy link
Owner

Choose a reason for hiding this comment

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

technically don't need these async keywords when you never use await in the function body, but doesn't really matter either way

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh right yeah, those might just be a hold out when I was testing a different method earlier.

@fchorney fchorney merged commit 816fced into main Apr 11, 2024
4 checks passed
@fchorney fchorney deleted the fc/no-throwing branch April 11, 2024 14:23
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