Skip to content

Commit

Permalink
memoize => once
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed Jun 16, 2021
1 parent 217e304 commit 4dd2931
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { memoize } from 'lodash';
import { once } from 'lodash';
import { HttpStart, CoreStart } from '../../../../../core/public';
import { IndexPatternCreationConfig, UrlHandler, IndexPatternCreationOption } from './config';
import { CONFIG_ROLLUPS } from '../../constants';
Expand All @@ -20,7 +20,7 @@ interface IndexPatternCreationManagerStart {

export class IndexPatternCreationManager {
start({ httpClient, uiSettings }: IndexPatternCreationManagerStart) {
const getConfigs = memoize(() => {
const getConfigs = once(() => {
const configs: IndexPatternCreationConfig[] = [];
configs.push(new IndexPatternCreationConfig({ httpClient }));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import { IIndexPattern, IFieldType } from 'src/plugins/data/public';
import { SimpleSavedObject } from 'src/core/public';
import { memoize } from 'lodash';
import { once } from 'lodash';
import { CoreStart } from '../../../../../core/public';
import { IndexPatternListConfig, IndexPatternTag } from './config';
import { CONFIG_ROLLUPS } from '../../constants';
Expand All @@ -21,7 +21,7 @@ interface IndexPatternListManagerStart {

export class IndexPatternListManager {
start({ uiSettings }: IndexPatternListManagerStart) {
const getConfigs = memoize(() => {
const getConfigs = once(() => {
const configs: IndexPatternListConfig[] = [];
configs.push(new IndexPatternListConfig());

Expand Down

0 comments on commit 4dd2931

Please sign in to comment.