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

watt.wrapAll(this) is calling the getters; it's very problematic #56

Open
Skywalker13 opened this issue Nov 1, 2018 · 0 comments
Open

Comments

@Skywalker13
Copy link
Contributor

Hello

const watt = require('watt');

class Test {
  constructor() {
    watt.wrapAll(this);
  }

  get x() {
    console.log('x called by watt wrapping');
    console.log(new Error().stack);
  }
}

new Test();
$ node ./test.js 
x called by watt wrapping
Error
    at Test.get x [as x] (/home/schroeterm/devel/westeros-dev/test.js:10:17)
    at wrapAndBind (/home/schroeterm/devel/westeros-dev/node_modules/watt/index.js:63:16)
    at Function.wrapAll (/home/schroeterm/devel/westeros-dev/node_modules/watt/index.js:74:37)
    at new Test (/home/schroeterm/devel/westeros-dev/test.js:5:10)
    at Object.<anonymous> (/home/schroeterm/devel/westeros-dev/test.js:14:1)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
Skywalker13 added a commit to Xcraft-Inc/xcraft-core-goblin that referenced this issue Nov 2, 2018
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