mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[test] Failing test for returning from a for-loop
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
|
||||
## Input
|
||||
|
||||
```javascript
|
||||
function foo(props) {
|
||||
for (let i = 0; i < 10; i += 1) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
|
||||
## Error
|
||||
|
||||
```
|
||||
Cannot read properties of undefined (reading 'phis')
|
||||
```
|
||||
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
function foo(props) {
|
||||
for (let i = 0; i < 10; i += 1) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user