@@ -306,7 +306,7 @@ Forms.methods({
306
306
form . doc ( propertyName , propertyValue ) ;
307
307
} ) ;
308
308
var updatedDoc = Tracker . nonreactive ( function ( ) { return form . doc ( ) ; } ) ;
309
- return [ 'documentChange' , updatedDoc , changes ] ;
309
+ return [ 'documentChange' , updatedDoc , changes , form ] ;
310
310
} )
311
311
, invalidate : makeEventTrigger ( function ( propertyName , errors ) {
312
312
var form = this ;
@@ -321,12 +321,12 @@ Forms.methods({
321
321
form . errors ( errors ) ;
322
322
updatedDoc = Tracker . nonreactive ( function ( ) { return form . doc ( ) ; } ) ;
323
323
updatedErrors = Tracker . nonreactive ( function ( ) { return form . errors ( ) ; } ) ;
324
- return [ 'documentInvalid' , updatedDoc , updatedErrors ] ;
324
+ return [ 'documentInvalid' , updatedDoc , updatedErrors , form ] ;
325
325
} else {
326
326
form . errors ( propertyName , errors ) ;
327
327
updatedDoc = Tracker . nonreactive ( function ( ) { return form . doc ( ) ; } ) ;
328
328
updatedErrors = Tracker . nonreactive ( function ( ) { return form . errors ( propertyName ) ; } ) ;
329
- return [ 'propertyInvalid' , updatedDoc , updatedErrors ] ;
329
+ return [ 'propertyInvalid' , updatedDoc , updatedErrors , form ] ;
330
330
}
331
331
} )
332
332
, validate : makeEventTrigger ( function ( propertyName ) {
@@ -365,14 +365,14 @@ Forms.methods({
365
365
if ( errors . length ) {
366
366
updatedDoc = Tracker . nonreactive ( function ( ) { return form . doc ( ) ; } ) ;
367
367
updatedErrors = Tracker . nonreactive ( function ( ) { return form . errors ( ) ; } ) ;
368
- return [ 'documentInvalid' , updatedDoc , updatedErrors ] ;
368
+ return [ 'documentInvalid' , updatedDoc , updatedErrors , form ] ;
369
369
}
370
370
} else {
371
371
form . errors ( propertyName , errors ) ;
372
372
if ( errors . length ) {
373
373
updatedDoc = Tracker . nonreactive ( function ( ) { return form . doc ( ) ; } ) ;
374
374
updatedErrors = Tracker . nonreactive ( function ( ) { return form . errors ( propertyName ) ; } ) ;
375
- return [ 'propertyInvalid' , updatedDoc , updatedErrors ] ;
375
+ return [ 'propertyInvalid' , updatedDoc , updatedErrors , form ] ;
376
376
}
377
377
}
378
378
return null ;
@@ -383,9 +383,9 @@ Forms.methods({
383
383
var updatedDoc = Tracker . nonreactive ( function ( ) { return form . doc ( ) ; } ) ;
384
384
var updatedErrors = Tracker . nonreactive ( function ( ) { return form . errors ( ) ; } ) ;
385
385
if ( updatedErrors . length ) {
386
- return [ 'documentInvalid' , updatedDoc , updatedErrors ] ;
386
+ return [ 'documentInvalid' , updatedDoc , updatedErrors , form ] ;
387
387
} else {
388
- return [ 'documentSubmit' , updatedDoc ] ;
388
+ return [ 'documentSubmit' , updatedDoc , form ] ;
389
389
}
390
390
} )
391
391
} ) ;
0 commit comments