Skip to content

Commit

Permalink
Merge 8c2a8bd into 1156417
Browse files Browse the repository at this point in the history
  • Loading branch information
simonguo committed May 13, 2018
2 parents 1156417 + 8c2a8bd commit e9d7f2b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 14 deletions.
3 changes: 1 addition & 2 deletions src/DropdownMenu.js
Expand Up @@ -13,7 +13,6 @@ import {
createChainedFunction,
prefix,
ReactChildren,
isNullOrUndefined,
getUnhandledProps,
defaultProps
} from './utils';
Expand Down Expand Up @@ -113,7 +112,7 @@ class DropdownMenu extends React.Component<Props> {
};

isActive(props: Object, activeKey: any) {
if (props.active || (!isNullOrUndefined(activeKey) && _.isEqual(props.eventKey, activeKey))) {
if (props.active || (!_.isUndefined(activeKey) && _.isEqual(props.eventKey, activeKey))) {
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions src/InputNumber.js
Expand Up @@ -9,7 +9,7 @@ import Input from './Input';
import Button from './Button';
import Icon from './Icon';

import { prefix, defaultProps, isNullOrUndefined, getUnhandledProps } from './utils';
import { prefix, defaultProps, getUnhandledProps } from './utils';

type Props = {
className?: string,
Expand Down Expand Up @@ -199,7 +199,7 @@ class InputNumber extends React.Component<Props, State> {
step={step}
onChange={this.handleOnChange}
onBlur={this.handleBlur}
value={isNullOrUndefined(value) ? '' : value}
value={_.isNil(value) ? '' : value}
onWheel={this.handleWheel}
disabled={disabled}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/Panel.js
Expand Up @@ -5,7 +5,7 @@ import classNames from 'classnames';
import _ from 'lodash';
import Collapse from 'rsuite-utils/lib/Animation/Collapse';

import { isNullOrUndefined, getUnhandledProps, defaultProps, prefix } from './utils';
import { getUnhandledProps, defaultProps, prefix } from './utils';

type Props = {
collapsible?: boolean,
Expand Down Expand Up @@ -63,7 +63,7 @@ class Panel extends React.Component<Props, State> {
};

isExpanded() {
return isNullOrUndefined(this.props.expanded) ? this.state.expanded : this.props.expanded;
return _.isUndefined(this.props.expanded) ? this.state.expanded : this.props.expanded;
}
addPrefix = (name: string) => prefix(this.props.classPrefix)(name);

Expand Down
1 change: 0 additions & 1 deletion src/utils/index.js
Expand Up @@ -4,7 +4,6 @@ export createChainedFunction from './createChainedFunction';
export defaultProps from './defaultProps';
export deprecationWarning from './deprecationWarning';
export getUnhandledProps from './getUnhandledProps';
export isNullOrUndefined from './isNullOrUndefined';
export isOneOf from './isOneOf';
export lowPriorityWarning from './lowPriorityWarning';
export prefix from './prefix';
Expand Down
7 changes: 0 additions & 7 deletions src/utils/isNullOrUndefined.js

This file was deleted.

0 comments on commit e9d7f2b

Please sign in to comment.