Skip to content

Commit

Permalink
Replaced an unintentional template literal to ensure broader browser …
Browse files Browse the repository at this point in the history
…compatibility.
  • Loading branch information
bvaughn committed Apr 11, 2018
1 parent 9190291 commit ce42fe4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,15 @@ export function polyfill(Component) {

throw Error(
'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' +
`${componentName} uses ${newApiName} but also contains the following legacy lifecycles:` +
(foundWillMountName !== null ? `\n ${foundWillMountName}` : '') +
componentName +
' uses ' +
newApiName +
' but also contains the following legacy lifecycles:' +
(foundWillMountName !== null ? '\n ' + foundWillMountName : '') +
(foundWillReceivePropsName !== null
? `\n ${foundWillReceivePropsName}`
? '\n ' + foundWillReceivePropsName
: '') +
(foundWillUpdateName !== null ? `\n ${foundWillUpdateName}` : '') +
(foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') +
'\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' +
'https://fb.me/react-async-component-lifecycle-hooks'
);
Expand Down

0 comments on commit ce42fe4

Please sign in to comment.