[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(
removeTypeTheme(alias(type)),
removeTypeTheme(alias(computedType)),
dangerousTheme || theme || defaultTheme,
);
innerNode = (

@ -554,10 +554,8 @@ export default class Table<T> extends React.Component<TableProps<T>, TableState<
handleRadioSelect = (record: T, rowIndex: number, e: RadioChangeEvent) => {
const checked = e.target.checked;
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);
selectedRowKeys = [key];
const selectedRowKeys = [key];
this.store.setState({
selectionDirty: true,
});

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

Loading…
Cancel
Save