Removing a undefined call on function.

Hello, i got a error of undefined function while was working with cordova and solve it just removing this line.
Could you confirm if it was really lost in the code?

Line 117
deferredLogin.reject({error: 'user_cancelled', error_description: 'User cancelled login process', error_reason: "user_cancelled"});