Skip to content

Commit

Permalink
refactor: default dynamic loading component to null (#7543)
Browse files Browse the repository at this point in the history
  • Loading branch information
taro-shono authored and ijjk committed Jun 28, 2019
1 parent 5e70a2f commit ec958a3
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/next-server/lib/dynamic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ export function noSSR<P = {}>(
)
}

function DefaultLoading() {
return null
}

// function dynamic<P = {}, O extends DynamicOptions>(options: O):

export default function dynamic<P = {}>(
Expand All @@ -83,7 +79,7 @@ export default function dynamic<P = {}>(
if (!pastDelay) return null
if (process.env.NODE_ENV === 'development') {
if (isLoading) {
return <DefaultLoading />
return null
}
if (error) {
return (
Expand All @@ -96,7 +92,7 @@ export default function dynamic<P = {}>(
}
}

return <DefaultLoading />
return null
},
}

Expand Down

0 comments on commit ec958a3

Please sign in to comment.