From ddcd37d9c9167cf551513b381eca08fc4a4daa1d Mon Sep 17 00:00:00 2001 From: Alexander Fedyashov Date: Thu, 31 Aug 2017 18:50:43 +0300 Subject: [PATCH] style(mixed): fix lint issues --- src/addons/Ref/Ref.js | 2 +- src/lib/getElementType.js | 2 +- test/specs/addons/Ref/Ref-test.js | 2 +- test/specs/addons/Ref/fixtures.js | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/addons/Ref/Ref.js b/src/addons/Ref/Ref.js index a0e2456cbb..3756dec603 100644 --- a/src/addons/Ref/Ref.js +++ b/src/addons/Ref/Ref.js @@ -31,7 +31,7 @@ export default class Ref extends Component { // Heads up! Don't move this condition, it's a short circle that avoids run of `findDOMNode` // if `innerRef` isn't passed - if (innerRef) innerRef(findDOMNode(this)) + if (innerRef) innerRef(findDOMNode(this)) // eslint-disable-line react/no-find-dom-node } render() { diff --git a/src/lib/getElementType.js b/src/lib/getElementType.js index c06f522dc8..5a4b2dedc6 100644 --- a/src/lib/getElementType.js +++ b/src/lib/getElementType.js @@ -21,7 +21,7 @@ export const computeElementType = (Component, props, getDefault) => { // computed default element type if (getDefault) { - const computedDefault = getDefault() + const computedDefault = typeof getDefault === 'function' ? getDefault() : getDefault if (computedDefault) return computedDefault } diff --git a/test/specs/addons/Ref/Ref-test.js b/test/specs/addons/Ref/Ref-test.js index 7593fd4aba..4654cf3b14 100644 --- a/test/specs/addons/Ref/Ref-test.js +++ b/test/specs/addons/Ref/Ref-test.js @@ -10,7 +10,7 @@ const nodeMount = (Component, innerRef) => ( mount( - + , ) .find('#node') .getDOMNode() diff --git a/test/specs/addons/Ref/fixtures.js b/test/specs/addons/Ref/fixtures.js index 0b02b45426..810d5d0604 100644 --- a/test/specs/addons/Ref/fixtures.js +++ b/test/specs/addons/Ref/fixtures.js @@ -1,9 +1,9 @@ -/* eslint-disable react/no-multi-comp */ +/* eslint-disable */ import React, { Component } from 'react' -export const DOMFunction = (props) =>
+export const DOMFunction = props =>
-export const CompositeFunction = (props) => +export const CompositeFunction = props => export class DOMClass extends Component { render() {