Skip to content

Undefined Variable Inside Asyncblock #3

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)
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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