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

getRelativeNumber() don't trim args #336

Closed
hundun000 opened this issue Nov 17, 2022 · 2 comments
Closed

getRelativeNumber() don't trim args #336

hundun000 opened this issue Nov 17, 2022 · 2 comments
Labels

Comments

@hundun000
Copy link

getRelativeNumber() don't trim args. If the arg is number type the Number() can handle it; else if it's relatived string, it will miss the if-case because the whitespace and return wrong number 0.

reproduction (just edit room from dialog doc's example):

{draw "type, source, +1, +1, room"} // will wrong draw at (0, 0)

@seleb seleb closed this as completed in a2dc72f Nov 17, 2022
seleb pushed a commit that referenced this issue Nov 17, 2022
## [21.2.1](v21.2.0...v21.2.1) (2022-11-17)

### Bug Fixes

* **utils:** `getRelativeNumber` ignores whitespace (fixes [#336](#336)) ([a2dc72f](a2dc72f))
@seleb
Copy link
Owner

seleb commented Nov 17, 2022

thanks for the bug report, this should be fixed now!

@seleb
Copy link
Owner

seleb commented Nov 17, 2022

🎉 This issue has been resolved in version 21.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@seleb seleb added the released label Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants