-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Error: circular promise resolution chain
Error: circular promise resolution chain
This usually happens when you have a promise that resolves or rejects with itself.
For example: var p = Promise.delay(100).then(function(){ return p}); .
In this case, the promise resolves with itself which was not intended.
This also happens when implementing live-updating models with a .then method that indicates when the model is "ready". A promise is a process, it starts and it ends.
Promises do not aim to solve such live updating problems directly. One option would be to use an intermediate promise - for example a .loaded property on the model that fulfills with nothing.
resolving it with itself tells it "it is done when it is done"
What sorcery is this?!
so just dont wwrite cryptic ancient js that nobody knows because turbo doesnt know eitherhttps://github.com/petkaantonov/bluebird.wiki.git
lol ancient Q JS circa 2012 being called up randoml to make a circular logic loom promise that, surprisingly, does not reject itself when it calls itself!
- Dr Q, the other ancient Q https//github.com/drqedwards/ppm