mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2024-04-21 12:32:22 +00:00
fix: variable scope
This commit is contained in:
+2
-1
@@ -505,8 +505,9 @@ function spawn(genF) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
const gen = genF();
|
||||
function step(nextF) {
|
||||
let next;
|
||||
try {
|
||||
var next = nextF();
|
||||
next = nextF();
|
||||
} catch(e) {
|
||||
return reject(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user