Skip to content

Commit e3fb6e3

Browse files
authored
fix bug
1 parent fab5d74 commit e3fb6e3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ios/RCTBaiduMap/RCTBaiduMapView.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@ -(void)setMarkers:(NSArray *)markers {
6969
NSLog(sannotationsCount);
7070

7171
if(markersCount < _annotationsCount) {
72-
int start = _annotationsCount - markersCount;
73-
for(int i = start; i < _annotationsCount; i++) {
74-
NSLog(@"forforforfor");
72+
int start = _annotationsCount - 1;
73+
for(int i = start; i >= markersCount; i--) {
7574
BMKPointAnnotation *annotation = [_annotations objectAtIndex:i];
7675
[self removeAnnotation:annotation];
7776
[_annotations removeObject:annotation];
@@ -108,4 +107,4 @@ -(void)updateMarker:(BMKPointAnnotation *)annotation option:(NSDictionary *)opti
108107
}
109108

110109

111-
@end
110+
@end

0 commit comments

Comments
 (0)