Skip to content

Undefined Variable Inside Asyncblock #3

@KelsenH

Description

@KelsenH

Variables that are defined before asyncblock are undefined when referenced inside of asyncblock
Does not appear to occur for string values, but does for objects

E.G.

var func = function (args, callback) {
  var foo = args.foo;

  asyncblock (function*(){
    console.log(foo) //prints undefined
    console.log(args.foo) //prints value of foo
  },callback)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions