Giter VIP home page Giter VIP logo

Comments (8)

yoshuawuyts avatar yoshuawuyts commented on May 22, 2024

Okay, part of the error is that collection.add doesn´t work. When using collection.create I still get the error, but at least my indexDB gets updated. Seems like I was experiencing symptoms from two different errors. Curious what´s still causing the error to throw though.

from localforage.

yoshuawuyts avatar yoshuawuyts commented on May 22, 2024

It also appears that setting sync: Backbone.localforage.sync('MyOfflineStore') on collections doesn´t work. It only actually pushes something to IndexDB if I set it on my models, it throws an error if set on a collection. I think that is the same error that happened with your example Backbone implementation, and also the reason that my DB was updating while still saving data (forgot to clear).

Hope this helps!

from localforage.

magalhas avatar magalhas commented on May 22, 2024

I really think you have something wrong on your code/workspace/w/e. Everything works fine for me on different environments. Also unit tests are passing. Did you test on a different browser?

from localforage.

tofumatt avatar tofumatt commented on May 22, 2024

The unit tests don’t exactly do what’s in the examples, but @yoshuawuyts, if you could send a gist of what’s not working I’d be happy to look through it. Or are you just loading the example pages directly and getting an error?

from localforage.

yoshuawuyts avatar yoshuawuyts commented on May 22, 2024

Yep, just running the bare examples. No errors get thrown until I try to add the sync method to a Collection (as displayed in the provided example). Also I'm not using any type of arcane setup, so I'm really wondering why it isn't working for me.

from localforage.

yoshuawuyts avatar yoshuawuyts commented on May 22, 2024

When running the Backbone example in another browser (Midori, Webkit based) I´m getting this:

backbone.localforage.js:161TypeError: 'undefined' is not a constructor (evaluating 'new Promise')
backbone.js:1569Error: A "url" property or function must be specified

Is this of any help?

from localforage.

tofumatt avatar tofumatt commented on May 22, 2024

Looked through and you were right @yoshuawuyts, but it was fixed and now tested against in 33156f9. Should be good now!

from localforage.

yoshuawuyts avatar yoshuawuyts commented on May 22, 2024

Great to hear!

from 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.