Skip to content

Commit

Permalink
style: remove additional formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
eldar-gamisoniya committed Sep 7, 2017
1 parent c45fa5f commit 69b42f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
9 changes: 4 additions & 5 deletions src/requireUniversalModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,10 @@ const getConfig = (
: universalConfig
}

const load: Load =
typeof universalConfig === 'function'
? universalConfig
: // $FlowIssue
() => universalConfig
const load: Load = typeof universalConfig === 'function'
? universalConfig
: // $FlowIssue
() => universalConfig

return {
file: 'default',
Expand Down
11 changes: 4 additions & 7 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ export const babelInterop = (mod: ?Mod) =>
mod && typeof mod === 'object' && mod.__esModule ? mod.default : mod

export const DefaultLoading = () => <div>Loading...</div>
export const DefaultError = ({ error }: { error: Object }) => (
export const DefaultError = ({ error }: { error: Object }) =>
<div>Error: {error && error.message}</div>
)

export const tryRequire = (id: Id): ?any => {
try {
Expand Down Expand Up @@ -62,11 +61,9 @@ export const findExport = (mod: ?Mod, key?: Key): ?any => {
}

export const createElement = (Component: any, props: {}) =>
React.isValidElement(Component) ? (
React.cloneElement(Component, props)
) : (
<Component {...props} />
)
React.isValidElement(Component)
? React.cloneElement(Component, props)
: <Component {...props} />

export const callForString = (strFun: StrFun, props: Object) =>
typeof strFun === 'function' ? strFun(props) : strFun
Expand Down

0 comments on commit 69b42f3

Please sign in to comment.