Submit method callback should be called even without results #2

Closed
epd opened this Issue Nov 19, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@epd

epd commented Nov 19, 2013

From https://github.com/prismicio/javascript-kit/blob/master/src/api.js#L277-L320, when we query documents (by, say document.id) and we don't have any results come back, the callback does not get invoked because of the check on line 315: if (cb && docs.length) {.

This is an issue if we want to handle a 404 scenario and redirect in the browser. Perhaps I can work with you guys to resolve this!

guillaumebort added a commit that referenced this issue Nov 19, 2013

@guillaumebort

This comment has been minimized.

Show comment Hide comment
@guillaumebort

guillaumebort Nov 19, 2013

Contributor

Thanks! It should be fixed now.

Contributor

guillaumebort commented Nov 19, 2013

Thanks! It should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment