Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

Option "requests" is ignored #73

Closed
Fensterbank opened this issue May 16, 2014 · 5 comments
Closed

Option "requests" is ignored #73

Fensterbank opened this issue May 16, 2014 · 5 comments

Comments

@Fensterbank
Copy link

Hello,

I noticed that the Option "requests" is ignored completeley.
In offline.js, requests is not in the variable defaultOptions, what means in requests.js (Line 65) the code Offline.getOption('requests') returns undefined and the condition is true.

if (Offline.getOption('requests') !== false) {
      Offline.on('confirmed-up', function() {
        if (waitingOnConfirm) {
          waitingOnConfirm = false;
          return clear();
        }
      });
      Offline.on('up', flush);

This whole code is executed directly after loading the javascript file.

A user has no possibility to enable or disable the "requests"-Feature, because when the options are set in code programmatically, the events for doing the requests are already binded.

@dtognazzini
Copy link

I've ran into this issue as well. Seems pretty broken.

@scp
Copy link

scp commented Oct 30, 2014

Yup, still broken in latest build.

@rastographics
Copy link

I'm having this exact problem. Because of my app design, I have to send a call to persist all changes to server. When "requests" is enabled in OfflineJs, it causes all my changes to be duplicated.
Life would be so much easier if this feature could really be disabled as it says is possible in the documentation.

@vivex
Copy link

vivex commented Mar 17, 2015

Now it seems to be fixed, so close this issue :)

@rawls238
Copy link
Contributor

This was fixed here: #163 so closing. Please comment if this is still an issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants