diff --git a/public/app/features/dashboard/components/PanelEditor/FieldConfigEditor.tsx b/public/app/features/dashboard/components/PanelEditor/FieldConfigEditor.tsx index 0655d8a8bcb..d96bdc54633 100644 --- a/public/app/features/dashboard/components/PanelEditor/FieldConfigEditor.tsx +++ b/public/app/features/dashboard/components/PanelEditor/FieldConfigEditor.tsx @@ -1,5 +1,5 @@ import React, { ReactNode, useCallback } from 'react'; -import cloneDeep from 'lodash/cloneDeep'; +import { get as lodashGet, cloneDeep } from 'lodash'; import { DataFrame, DocsId, @@ -146,9 +146,9 @@ export const DefaultFieldConfigEditor: React.FC = ({ data, onChange, conf const defaults = config.defaults; const value = item.isCustom ? defaults.custom - ? defaults.custom[item.path] + ? lodashGet(defaults.custom, item.path) : undefined - : (defaults as any)[item.path]; + : lodashGet(defaults, item.path); let label: ReactNode | undefined = (