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

isObservable(obj, property) does not return true for unevaluated computed properties #373

Closed
jeffling opened this issue Jun 29, 2016 · 4 comments
Labels

Comments

@jeffling
Copy link

jeffling commented Jun 29, 2016

@computed get computedVal() { returns some stuff }
constructor() {
  console.log(isObservable(this, 'computedVal')) // false
  console.log(this.computedVal);  // some stuff
  console.log(isObservable(this, 'computedVal')) // true
}

Workaround would be to evaluate your computed property before the check.

@jeffling jeffling changed the title @computed keypath doesn't return true in isObservable(obj, keypath) isObservable(obj, property) does not return true for unevaluated computed properties Jun 29, 2016
@mweststrate
Copy link
Member

Just double checking: you are transpiling using babel?

@jeffling
Copy link
Author

@mweststrate we're using typescript

@mweststrate
Copy link
Member

@jeffling I added a regression test, but the problem seems to be gone, I think it has been fixed with one of the late decorator fixes. Could you verify that?

@jeffling
Copy link
Author

jeffling commented Aug 19, 2016

Sorry for huge delay in response. Yes, confirmed fixed :)

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

No branches or pull requests

2 participants