Skip to content

Commit

Permalink
fix: fixed funky transition stuff from happening when popping a route
Browse files Browse the repository at this point in the history
  • Loading branch information
IjzerenHein committed Aug 30, 2019
1 parent 00c74a5 commit 4567dc6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/createSharedElementScene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function createSharedElementScene(
rendererData: ISharedElementRendererData
): React.ComponentType<any> {
class SharedElementSceneView extends React.PureComponent<PropsType> {
private initial: boolean = true;
private subscriptions: {
[key: string]: SharedElementEventSubscription;
} = {};
Expand Down Expand Up @@ -82,7 +83,8 @@ function createSharedElementScene(

private onWillFocus = () => {
const sharedElements = this.getSharedElements();
if (sharedElements) {
if (sharedElements && this.initial) {
this.initial = false;
rendererData.willActivateScene(this.sceneData, sharedElements);
}
};
Expand Down

0 comments on commit 4567dc6

Please sign in to comment.