Skip to content

Commit

Permalink
style(core): wrap Overridable expressions in parens (#4913)
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherchrisberry committed Feb 27, 2018
1 parent 3ab1506 commit f3874dc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/scripts/modules/core/src/overrideRegistry/Overridable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,14 @@ export function overridableComponent <P extends IOverridableProps, T extends Rea
if (cloudProviderTemplateOverride) {
const cloudProviderController = cloudProviderRegistry.getValue(cloudProvider, key + 'Controller', providerVersion);
const controllerAs = cloudProviderController && cloudProviderController.includes(' as ') ? undefined : 'ctrl';
const Component = (props: any) =>
const Component = (props: any) => (
<AngularJSAdapter
{...props}
templateUrl={cloudProviderTemplateOverride}
controller={cloudProviderController}
controllerAs={controllerAs}
/>;
/>
);

return Component as any as T;
}
Expand All @@ -135,13 +136,14 @@ export function overridableComponent <P extends IOverridableProps, T extends Rea
if (templateOverride) {
const controllerOverride: string = overrideRegistry.getController(key, null);
const controllerAs = controllerOverride && controllerOverride.includes(' as ') ? undefined : 'ctrl';
const Component = (props: any) =>
const Component = (props: any) => (
<AngularJSAdapter
{...props}
templateUrl={templateOverride}
controller={controllerOverride}
controllerAs={controllerAs}
/>;
/>
);

return Component as any as T;
}
Expand Down

1 comment on commit f3874dc

@christopherthielen
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v good

Please sign in to comment.