File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -263,6 +263,7 @@ + (void)collectDirtyChildren:(id)node
263263
264264 } else if ([node isKindOfClass: [PFObject class ]]) {
265265 PFObject *object = (PFObject *)node;
266+ NSDictionary *toSearch = nil ;
266267
267268 @synchronized ([object lock ]) {
268269 // Check for cycles of new objects. Any such cycle means it will be
@@ -288,18 +289,19 @@ + (void)collectDirtyChildren:(id)node
288289 // Recurse into this object's children looking for dirty children.
289290 // We only need to look at the child object's current estimated data,
290291 // because that's the only data that might need to be saved now.
291- [self collectDirtyChildren: object->_estimatedData.dictionaryRepresentation
292- children: dirtyChildren
293- files: dirtyFiles
294- seen: seen
295- seenNew: seenNew
296- currentUser: currentUser];
297-
298- if ([object isDirty: NO ]) {
299- [dirtyChildren addObject: object];
300- }
292+ toSearch = [object->_estimatedData.dictionaryRepresentation copy ];
301293 }
302294
295+ [self collectDirtyChildren: toSearch
296+ children: dirtyChildren
297+ files: dirtyFiles
298+ seen: seen
299+ seenNew: seenNew
300+ currentUser: currentUser];
301+
302+ if ([object isDirty: NO ]) {
303+ [dirtyChildren addObject: object];
304+ }
303305 } else if ([node isKindOfClass: [PFFile class ]]) {
304306 PFFile *file = (PFFile *)node;
305307 if (!file.url ) {
You can’t perform that action at this time.
0 commit comments