lundi 22 mars 2021

Is store.unloadAll on ember data 2.18.x suppose to make an ajax call?

The Context:

I just updated an Ember App from 2.16 to 2.18.

The Situation

In our code, we are manually cleaning up one of our models data by doing: store.unloadAll('myModel'); inside an ember.run, the code looks like this:

Ember.run(function() {
    store.unloadAll('myModel');
});

and I am seeing some ajaxs calls being made to the .../myModel endpoints.

The problem

I cannot explain why those ajax calls are being done.

What I have tried

I am running the store.unloadAll('myModel'); outside of the Ember.run block, and not seeing the issue any longer, however, I really would like to understand why this is happening.




Aucun commentaire:

Enregistrer un commentaire