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

v0.5.0 - TypeError: Cannot read property 'then' of undefined #39

Open
ghost opened this issue Apr 17, 2015 · 2 comments
Open

v0.5.0 - TypeError: Cannot read property 'then' of undefined #39

ghost opened this issue Apr 17, 2015 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 17, 2015

I'm getting this error when calling deactivate (subsequent calls to activate fail):

 TypeError: Cannot read property 'then' of undefined

on this line:
https://github.com/btford/angular-modal/blob/master/modal.js#L75

I rolled back to v0.4.0 and there is no error.

@ryanhart2
Copy link

What version of angular are you using? You may want to have a look at issue #26

@ghost
Copy link
Author

ghost commented Apr 18, 2015

Yes, I am using Angular 1.2 and I am not able to upgrade.

The following works as a fix, if I did a PR would you accept?

function callback (){...}
var promise = $animate.leave(element, callback)
if (promise) 
    promise.then(callback)

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