diff --git a/Mantle/MTLModel.m b/Mantle/MTLModel.m index 6cf332cc..2ef60fed 100644 --- a/Mantle/MTLModel.m +++ b/Mantle/MTLModel.m @@ -184,8 +184,9 @@ - (void)mergeValueForKey:(NSString *)key fromModel:(MTLModel *)model { } - (void)mergeValuesForKeysFromModel:(MTLModel *)model { + NSSet *propertyKeys = model.class.propertyKeys; for (NSString *key in self.class.propertyKeys) { - if (![model.class.propertyKeys containsObject:key]) continue; + if (![propertyKeys containsObject:key]) continue; [self mergeValueForKey:key fromModel:model]; }