Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

"success is not a function"

$
0
0
I am upgrading from 3.2 to 3.3 and now this is broken:

  1. can.Model('Pand', {
  2.       findall: function( params, success, error) {
  3.             // when this is called 'success' is undefined
  4.       }
  5. }, {
  6.       // stuff
  7. }

When I call findAll

  1. Pand.findAll( {       // process

in can/model/models.js line 589 this is called
  1. var def = newMethod.apply(this, arguments);

(where arguments still are the object and the success function)

which then calls line 1071
  1. var def = pipe( oldFind.call( this, params ), this, method );
the oldFind.call( this, params ) causes Pand.findAll to be called with only the 'params' filled. 'success' is undefined.

Am I doing something wrong here or is this a bug?



Viewing all articles
Browse latest Browse all 3491

Trending Articles