Skip to content

Commit 44b4886

Browse files
committed
docs(generator): fix finally ruanyf#770
1 parent 13efdcb commit 44b4886

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/generator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ g.next() // { value: 1, done: false }
700700
g.return() // { value: undefined, done: true }
701701
```
702702

703-
如果 Generator 函数内部有`try...finally`代码块,那么`return`方法会推迟到`finally`代码块执行完再执行。
703+
如果 Generator 函数内部有`try...finally`代码块,且正在执行`try`代码块,那么`return`方法会推迟到`finally`代码块执行完再执行。
704704

705705
```javascript
706706
function* numbers () {

0 commit comments

Comments
 (0)