Skip to content
Advertisement

Return promise skipping Ajax call

I have a function in a class like this that returns a promise for deleting an item:

JavaScript

My question is, what do I return in order to ‘skip’ the ajax section which will validate to done so that I can do something like this (in another script):

JavaScript

Advertisement

Answer

Both of these seem work.

JavaScript

Thanks to the comments.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement