Skip to content

Commit cd01ab6

Browse files
committed
fix: fix SonarQube errors
1 parent 1cc2009 commit cd01ab6

4 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/actions/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const fetchResource = createAction(
2121
ActionTypes.GET_RESOURCE,
2222
ApiClient.fetchResource,
2323
(resourceType: string, filters?: any, include?: string[], embed?: string[], meta?: any) => {
24-
return Object.assign({}, meta, { resourceType });
24+
return { ...meta, resourceType };
2525
}
2626
);
2727

src/actions/queueHandler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default function queueHandler(store) {
3232
markAndSendObservation(store, item);
3333
});
3434

35-
const shouldRetryImmediately = ((opts && opts.initial === true) || store.getState().updateFlush);
35+
const shouldRetryImmediately = ((opts?.initial === true) || store.getState().updateFlush);
3636
if (shouldRetryImmediately) {
3737
_.each(timers, (_, key) => {
3838
clearTimeout(key);

src/components/LoginScreen.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,10 @@ class LoginScreen extends React.Component {
3434
}
3535
handleChange(field) {
3636
return (event) => {
37-
this.setState(
38-
Object.assign(
39-
this.state,
40-
{[field]: event.target.value}
41-
));
37+
this.setState(prevState => ({
38+
...prevState,
39+
[field]: event.target.value
40+
}));
4241
};
4342
}
4443
render() {

src/components/NotFound.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const NotFound: React.FC = () => {
77
<div className="list-group facility-return clearfix">
88
<Link to="/" className="list-group-item">
99
<span className="action-icon glyphicon glyphicon-chevron-left"></span>
10-
Takaisin
10+
{' '}Takaisin
1111
</Link>
1212
</div>
1313
<h4>404 - Sivua ei löytynyt</h4>

0 commit comments

Comments
 (0)