1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

Use const for the cloned trigger element

This commit is contained in:
Brett Sun 2015-10-30 11:13:32 +01:00
parent 22234492e6
commit 5bec3c5dc6

View File

@ -56,8 +56,8 @@ let ModalWrapper = React.createClass({
// If the trigger component exists, we add the ModalWrapper's show() as its onClick method.
// The trigger component should, in most cases, be a button.
let clonedTrigger = React.isValidElement(trigger) ? React.cloneElement(trigger, {onClick: this.show})
: null;
const clonedTrigger = React.isValidElement(trigger) ? React.cloneElement(trigger, {onClick: this.show})
: null;
return (
<span>
{clonedTrigger}