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

Using ngf-resize=someFunction fails with TypeError: Cannot read property 'then' of undefined #1691

Closed
sdeprez opened this issue Sep 7, 2016 · 1 comment
Labels

Comments

@sdeprez
Copy link

sdeprez commented Sep 7, 2016

For instance: ngf-resize=resizeOptions with

function resizeOptions () {
  var defer = $q.defer();
  defer.resolve({width: 100, height: 100, quality: .8});
  return defer.promise;
}

The culprit is this line which chain a then on the result of resize but you can see here that this function does not return nothing when ngfResize is a Function. Adding a simple return on this line seems to fix the problem.

Anyway thanks for your work, very useful library!

@danialfarid
Copy link
Owner

Fixed at 12.2.7

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