Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'id' of undefined #15

Closed
rafis opened this issue Aug 13, 2016 · 1 comment
Closed

TypeError: Cannot read property 'id' of undefined #15

rafis opened this issue Aug 13, 2016 · 1 comment

Comments

@rafis
Copy link

rafis commented Aug 13, 2016

node -v
v4.2.2

'use strict';

var domainCreate = require('domain').create;

var domain = domainCreate();
domain.id = 1;
domain.run(function() {
    console.log(process.domain.id);
    Promise.resolve().then(function() {
        console.log(process.domain.id);
    }).catch(function(err) {
        console.log(err);
    });
});

Can you explain?

@rafis rafis closed this as completed Aug 21, 2016
@rafis
Copy link
Author

rafis commented Aug 21, 2016

See answer here:
nodejs/node-v0.x-archive#8648

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant