Skip to content

Commit

Permalink
Use noop from full lodash import
Browse files Browse the repository at this point in the history
  • Loading branch information
walidkayhan committed Aug 21, 2024
1 parent 03eed69 commit 7994eb4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/app/src/lib/immutable-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*
*/

import _, { noop } from 'lodash';
import _ from 'lodash';
import events from 'events';
import { determineRoundedValue } from './rounding';

Expand All @@ -35,7 +35,9 @@ class ImmutableStore extends events.EventEmitter {
}

get(key: string, defaultValue?: any): any {
return (key === undefined) ? this.state : _.get(this.state, key, defaultValue);
return key === undefined
? this.state
: _.get(this.state, key, defaultValue);
}

set(key: string, value: any): any {
Expand Down Expand Up @@ -89,8 +91,8 @@ class ImmutableStore extends events.EventEmitter {
return this.state;
}

persist = noop;
getConfig = noop;
persist = _.noop;
getConfig = _.noop;
}

export default ImmutableStore;

0 comments on commit 7994eb4

Please sign in to comment.