Commit c7f2c53
Cast name to String to ensure .match is available
Summary:
PR for issue facebook#12444
In `validateProjectName` in `react-native-cli` `name.match` is called but it's not certain that `name`is a String. This casts `name`to a String before doing the match.
I didn't find any tests for this file so I didn't add any.
Reproduce:
```
cd react-native-cli
npm install
node index.js init 123
```
Before this PR the code throws an exception, after this PR the intended `console.error` is printed.
Closes facebook#12447
Differential Revision: D4584041
fbshipit-source-id: 117e76570aa9975ac851192b030c5a77daf19bcc1 parent cb68b97 commit c7f2c53
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| |||
0 commit comments