Replace lodash with built-ins where possible to reduce bundle size (#1766)
* add tslint rule to disallow lodash.isUndefined * add tslint rule to disallow lodash.isNull * apply fixes
This commit is contained in:
@@ -164,7 +164,7 @@ export class VoteForm extends React.Component<Props> {
|
||||
errors={errors}
|
||||
/>
|
||||
</InputRow>
|
||||
{!_.isUndefined(errors.signError) && (
|
||||
{errors.signError !== undefined && (
|
||||
<Paragraph isMuted={true} color={colors.red}>
|
||||
{errors.signError}
|
||||
</Paragraph>
|
||||
@@ -256,7 +256,7 @@ export class VoteForm extends React.Component<Props> {
|
||||
}
|
||||
} else {
|
||||
const responseBody = await response.json();
|
||||
const errorMessage = !_.isUndefined(responseBody.reason) ? responseBody.reason : 'Unknown Error';
|
||||
const errorMessage = responseBody.reason !== undefined ? responseBody.reason : 'Unknown Error';
|
||||
this._handleError(errorMessage);
|
||||
}
|
||||
} catch (err) {
|
||||
|
Reference in New Issue
Block a user