[chore] fix useless assignments to local variables

This commit addresses all the instances of useless assignments to
local variables, as found by LGTM.com
pull/13747/head
Sam Lanning 6 years ago committed by 偏右
parent bfc75f5872
commit e56e1a71c3

@ -138,7 +138,7 @@ const Icon: IconComponent<IconProps> = props => {
); );
} }
computedType = withThemeSuffix( computedType = withThemeSuffix(
removeTypeTheme(alias(type)), removeTypeTheme(alias(computedType)),
dangerousTheme || theme || defaultTheme, dangerousTheme || theme || defaultTheme,
); );
innerNode = ( innerNode = (

@ -554,10 +554,8 @@ export default class Table<T> extends React.Component<TableProps<T>, TableState<
handleRadioSelect = (record: T, rowIndex: number, e: RadioChangeEvent) => { handleRadioSelect = (record: T, rowIndex: number, e: RadioChangeEvent) => {
const checked = e.target.checked; const checked = e.target.checked;
const nativeEvent = e.nativeEvent; const nativeEvent = e.nativeEvent;
const defaultSelection = this.store.getState().selectionDirty ? [] : this.getDefaultSelection();
let selectedRowKeys = this.store.getState().selectedRowKeys.concat(defaultSelection);
const key = this.getRecordKey(record, rowIndex); const key = this.getRecordKey(record, rowIndex);
selectedRowKeys = [key]; const selectedRowKeys = [key];
this.store.setState({ this.store.setState({
selectionDirty: true, selectionDirty: true,
}); });

@ -143,7 +143,7 @@ export default class DirectoryTree extends React.Component<DirectoryTreeProps, D
const shiftPick: boolean = nativeEvent.shiftKey; const shiftPick: boolean = nativeEvent.shiftKey;
// Generate new selected keys // Generate new selected keys
let newSelectedKeys = selectedKeys.slice(); let newSelectedKeys: string[];
if (multiple && ctrlPick) { if (multiple && ctrlPick) {
// Control click // Control click
newSelectedKeys = keys; newSelectedKeys = keys;

Loading…
Cancel
Save