Skip to content

Coerce option values to string in shQuote()#270

Open
Arm4g3ddon wants to merge 1 commit into
OpenDroneMap:masterfrom
Arm4g3ddon:fix-shquote-non-string
Open

Coerce option values to string in shQuote()#270
Arm4g3ddon wants to merge 1 commit into
OpenDroneMap:masterfrom
Arm4g3ddon:fix-shquote-non-string

Conversation

@Arm4g3ddon

Copy link
Copy Markdown

Fixes #269.

shQuote() called .replace() straight on the value, which throws TypeError: s.replace is not a function for numeric option values. Wrapping the value in String() handles numbers (and anything else non-string) while leaving normal string values unchanged.

shQuote called .replace() directly on the value, which throws
'TypeError: s.replace is not a function' when an option value is a
number instead of a string. Wrap it in String() so numeric values
are handled too.
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.

shQuote() throws on numeric option values: TypeError: s.replace is not a function

1 participant