File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1017,10 +1017,10 @@ var BookshelfModel = _model2.default.extend({
1017
1017
throw new this . constructor . NoRowsUpdatedError ( 'No Rows Updated' ) ;
1018
1018
}
1019
1019
} else {
1020
- var returningAttrs = resp [ 0 ] ;
1021
- var updatedCols = { } ;
1022
- updatedCols [ this . idAttribute ] = this . id = returningAttrs . id ;
1023
- delete returningAttrs . id ;
1020
+ var updatedCols = resp [ 0 ] ;
1021
+ var idAttribute = updatedCols . id ;
1022
+ delete updatedCols . id ;
1023
+ updatedCols [ this . idAttribute ] = this . id = idAttribute ;
1024
1024
var updatedAttrs = this . parse ( updatedCols ) ;
1025
1025
_lodash2 . default . assign ( this . attributes , updatedAttrs ) ;
1026
1026
}
Original file line number Diff line number Diff line change @@ -984,10 +984,10 @@ const BookshelfModel = ModelBase.extend({
984
984
throw new this . constructor . NoRowsUpdatedError ( 'No Rows Updated' ) ;
985
985
}
986
986
} else {
987
- const returningAttrs = resp [ 0 ] ;
988
- const updatedCols = { } ;
989
- updatedCols [ this . idAttribute ] = this . id = returningAttrs . id ;
990
- delete returningAttrs . id ;
987
+ const updatedCols = resp [ 0 ] ;
988
+ const idAttribute = updatedCols . id ;
989
+ delete updatedCols . id ;
990
+ updatedCols [ this . idAttribute ] = this . id = idAttribute ;
991
991
const updatedAttrs = this . parse ( updatedCols ) ;
992
992
_ . assign ( this . attributes , updatedAttrs ) ;
993
993
}
You can’t perform that action at this time.
0 commit comments