File tree Expand file tree Collapse file tree 3 files changed +18
-21
lines changed
Expand file tree Collapse file tree 3 files changed +18
-21
lines changed Original file line number Diff line number Diff line change @@ -1084,26 +1084,25 @@ PrivacyListProxy.prototype = {
10841084 } ,
10851085
10861086 update : function ( list , callback ) {
1087- var self = this , copyList = list ;
1087+ var self = this ;
10881088
1089- self . getList ( copyList . name , function ( error , response ) {
1089+ self . getList ( list . name , function ( error , response ) {
10901090 if ( error ) {
10911091 callback ( error , null ) ;
10921092 } else {
1093- var oldArray = response . items ,
1093+ var copyList = ( JSON . parse ( JSON . stringify ( list ) ) ) ,
1094+ oldArray = response . items ,
10941095 newArray = copyList . items ,
1095- updatedArray = [ ] ,
1096- createList = { } ;
1096+ createdList = { } ;
10971097
1098- updatedArray = $ . merge ( oldArray , newArray ) ;
1099- copyList . items = updatedArray ;
1100- createList = copyList ;
1098+ copyList . items = $ . merge ( oldArray , newArray ) ;
1099+ createdList = copyList ;
11011100
1102- self . create ( createList , function ( error , response ) {
1101+ self . create ( createdList , function ( err , result ) {
11031102 if ( error ) {
1104- callback ( error , null ) ;
1103+ callback ( err , null ) ;
11051104 } else {
1106- callback ( null , createList ) ;
1105+ callback ( null , result ) ;
11071106 }
11081107 } ) ;
11091108 }
You can’t perform that action at this time.
0 commit comments