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

Make sure keys gets arguments right #136

Merged
merged 2 commits into from
Apr 28, 2016
Merged

Make sure keys gets arguments right #136

merged 2 commits into from
Apr 28, 2016

Conversation

imurchie
Copy link
Contributor

We get an array sometimes. Make sure we send a string along.

See appium/appium#6441

@imurchie imurchie merged commit 695938f into master Apr 28, 2016
@imurchie imurchie deleted the isaac-keys branch April 28, 2016 14:09
keys = keys.join('');
}
if (!_.isString(keys)) {
keys = `${keys}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

is this the same as keys = keys.toString()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is, as long as keys is an array with a string inside. I think the spec says it ought to take an array of characters, in which case ['a', 'b', 'c'].toString() == 'a,b,c'

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, I was more commenting on what we would prefer to standardize on if

`${keys}`

and

keys.toString()

are equivalent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah! I see. Yes, toString is better. And not sure why I went with the other, to be perfectly honest.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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