Skip to content

Commit

Permalink
[marker flicker] Fix flicker of map pins on state change (react-nativ…
Browse files Browse the repository at this point in the history
  • Loading branch information
mlanter authored and Exilz committed Dec 9, 2016
1 parent 285bc66 commit 3e171e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/decorateMapComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export default function decorateMapComponent(Component, { componentType, provide
if (components[provider]) return components[provider];

if (provider === PROVIDER_DEFAULT) {
components.default = getDefaultComponent();
return components.default;
components[PROVIDER_DEFAULT] = getDefaultComponent();
return components[PROVIDER_DEFAULT];
}

const providerInfo = providers[provider];
Expand All @@ -62,8 +62,8 @@ export default function decorateMapComponent(Component, { componentType, provide
components[provider] = requireNativeComponent(componentName, Component);
}
} else { // (platformSupport === USES_DEFAULT_IMPLEMENTATION)
if (!components.default) components.default = getDefaultComponent();
components[provider] = components.default;
if (!components[PROVIDER_DEFAULT]) components[PROVIDER_DEFAULT] = getDefaultComponent();
components[provider] = components[PROVIDER_DEFAULT];
}

return components[provider];
Expand Down

0 comments on commit 3e171e1

Please sign in to comment.