mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 23:24:06 +08:00
fix incorrect count for layoutAnimation callback
Summary: fixes #3106 Having -1 would trigger callback one frame early causing it to be ignored on the next frame. Closes https://github.com/facebook/react-native/pull/3190 Reviewed By: svcscm Differential Revision: D2783700 Pulled By: mkonicek fb-gh-sync-id: 02070f70915055aec3b1543a8d553f2680438611
This commit is contained in:
committed by
facebook-github-bot-3
parent
c866a0a6d0
commit
c34ef25ec5
@@ -553,7 +553,7 @@ extern NSString *RCTBridgeModuleNameForClass(Class cls);
|
||||
|
||||
void (^completion)(BOOL) = ^(BOOL finished) {
|
||||
completionsCalled++;
|
||||
if (callback && completionsCalled == frames.count - 1) {
|
||||
if (callback && completionsCalled == frames.count) {
|
||||
callback(@[@(finished)]);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user