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

Blob() breaking change in 7.3.4 using Karma + PhantomJS #1027

Closed
joaovieira opened this issue Sep 25, 2015 · 4 comments
Closed

Blob() breaking change in 7.3.4 using Karma + PhantomJS #1027

joaovieira opened this issue Sep 25, 2015 · 4 comments

Comments

@joaovieira
Copy link

@danialfarid just wanted to let you know that 7.3.4 introduced Blob() which is only supported in the "new" PhantomJS 2.0 (ariya/phantomjs#11013). Karma does not have (official) support for PhantomJS 2.0 yet (karma-runner/karma-phantomjs-launcher#56). So this may cause an unexpected breaking change that could be mentioned in a migration guide?

Thanks.

We're staying with 7.3.3 for the time being :)

danialfarid pushed a commit that referenced this issue Sep 25, 2015
@danialfarid
Copy link
Owner

Added a check for Blob function in version 7.3.9. Should fix this issue.

@joaovieira
Copy link
Author

@danialfarid 7.3.9 did not fix this.

Here's a stacktrace:

TypeError: '[object BlobConstructor]' is not a constructor (evaluating 'new Blob()')
            at /Users/joaovieira/Documents/.../app/bower_components/ng-file-upload/ng-file-upload.js:32
            at /Users/joaovieira/Documents/.../app/bower_components/ng-file-upload/ng-file-upload.js:35
            at invoke (/Users/joaovieira/Documents/.../app/bower_components/angular/angular.js:4476)

Changing https://github.com/danialfarid/ng-file-upload/blob/master/dist/ng-file-upload.js#L32 to:

return window.Blob && Blob.slice;

Did the trick.

MDN Blob - https://developer.mozilla.org/en-US/docs/Web/API/Blob

@danialfarid danialfarid reopened this Sep 26, 2015
@danialfarid
Copy link
Owner

The changed didn't get in this version, will be fixed in the next version

@danialfarid
Copy link
Owner

Fixed in version 8.0.1

Darex1991 added a commit to Darex1991/ng-file-upload that referenced this issue Dec 17, 2015
Darex1991 added a commit to Darex1991/ng-file-upload that referenced this issue Dec 17, 2015
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

2 participants