How to make an if statement in jQuery done?

When on a table at the end of the reload element and there are two Function resetUser and resetSer. cause you need depending new is a record or has already been created for this check whether the specified id
handleSubmit(e) {
var that = this;
 if ( == null) that.props.resetSer
 else that.props.resetUser

Separately everything works fine
).done( that.props.resetSer)// or the second function

How to insert a check?
Tried at done to insert the function and inside the test, but it doesn't work.
July 9th 19 at 13:31

Find more questions by tags JavaScriptjQuery