Coder Social home page Coder Social logo

Comments (7)

ocombe avatar ocombe commented on August 10, 2024

Hmm that's weird, I've never seen this error...
Can you make me a plunkr with the problem ?
And let me know the browser/os that you're using too please.

from angular-localforage.

gertot avatar gertot commented on August 10, 2024

Hi,
i also got this error when trying to save an Blob.
The error occurs because of line 123 in file angular-localForage.js of release 1.2.0:
localCopy = angular.copy(value).

Here becomes the Blob an Object and that causes the error.
When adding the code:
if (value instanceof Blob) {
localCopy = value;
}
after the copy it works.
It seems that angular.copy(value) creates no correct copy of the value.

The error occurs in chrome and firefox.

from angular-localforage.

ocombe avatar ocombe commented on August 10, 2024

Hmm yes, I should only do an angular.copy on objects, I use it because it removes the special angular attributes that could lead to big problems (for examples attributes added by ng-repeat that would bug everything when you keep them outside ng-repeat).
Thanks for the report , I'll fix it!

from angular-localforage.

ocombe avatar ocombe commented on August 10, 2024

The issue is in the function angular.copy from Angular, I reported it here: angular/angular.js#10370, we'll see what they say and if I have to fix it in my code or if they fix it in angular.

from angular-localforage.

ocombe avatar ocombe commented on August 10, 2024

Well they don't want to fix it, so I'll add the test in the lib. But there is another unrelated problem with blobs in localforage, they don't work as expected for now: localForage/localForage#317, you should be careful if you use them until this issue is fixed.

from angular-localforage.

ocombe avatar ocombe commented on August 10, 2024

It's released in 1.2.1

from angular-localforage.

gertot avatar gertot commented on August 10, 2024

Thx for your rapid fix.

from angular-localforage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.