The _get() function from lodash succeeds even when the path refers to properties that do not exist on the object (e.g. a bug fixed in #3592). There is no need for it when we can do a type-safe compiler-checked access, e.g.
$ rg '_get\(' packages/jaeger-ui/src
packages/jaeger-ui/src/reducers/embedded.ts
11: const search = _get(window, 'location.search');
packages/jaeger-ui/src/components/SearchTracePage/SearchForm.tsx
851: searchMaxLookback: _get(state, 'config.search.maxLookback'),
852: searchAdjustEndTime: _get(state, 'config.search.adjustEndTime'),
packages/jaeger-ui/src/model/path-agnostic-decorations/index.tsx
34: let decorationValue = _get(state, `pathAgnosticDecorations.${decorationID}.withOp.${service}.${operation}`);
35: let decorationMax = _get(state, `pathAgnosticDecorations.${decorationID}.withOpMax`);
37: decorationValue = _get(state, `pathAgnosticDecorations.${decorationID}.withoutOp.${service}`);
38: decorationMax = _get(state, `pathAgnosticDecorations.${decorationID}.withoutOpMax`);
packages/jaeger-ui/src/utils/plexus/set-on-graph.ts
22: const matchSize = BASE_MATCH_SIZE + SCALABLE_MATCH_SIZE / _get(zoomTransform, 'k', 1);
packages/jaeger-ui/src/actions/path-agnostic-decorations.ts
80: return _get(res, getPath, `\`${getPath}\` not found in response`);
packages/jaeger-ui/src/utils/DraggableManager/DraggableManager.ts
103: const style = _get(document, 'body.style');
177: const style = _get(document, 'body.style');
packages/jaeger-ui/src/utils/config/process-deprecation.ts
33: const value = _get(config, formerKey);
packages/jaeger-ui/src/utils/tracking/ga.ts
272: isTruish(parseQuery(_get(window, 'location.search'))['ga-debug']);
273: const gaID = _get(config, 'tracking.gaID');
274: const isErrorsEnabled = isDebugMode || Boolean(_get(config, 'tracking.trackErrors'));
275: const cookiesToDimensions = _get(config, 'tracking.cookiesToDimensions');
packages/jaeger-ui/src/components/TracePage/index.tsx
156: `${textFilter} ${_get(this.props.trace, 'traceID')} ${_get(this.props.trace, 'data.spans.length')}`
359: graphFindMatches = getUiFindVertexKeys(uiFind, _get(this.traceDagEV, 'vertices', []));
362: spanFindMatches = this._filterSpans(uiFind, _get(trace, 'data.spans'));
packages/jaeger-ui/src/components/DeepDependencies/SidePanel/DetailsPanel.tsx
70: let details = _get(res, getDetailPath as string);
77: const columnDefs: TColumnDefs = getDefPath ? _get(res, getDefPath, []) : [];
packages/jaeger-ui/src/components/TracePage/TracePageHeader/TracePageHeader.tsx
93: renderer: (trace: IOtelTrace) => _get(_maxBy(trace.spans as any[], 'depth'), 'depth', 0) + 1,
packages/jaeger-ui/src/components/DeepDependencies/traces.tsx
62: urlState: sanitizeUrlState(urlState, _get(graphState, 'model.hash')),
packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanTreeOffset.tsx
69: _get(event, 'relatedTarget.dataset.ancestorId') !== ancestorId
86: _get(event, 'relatedTarget.dataset.ancestorId') !== ancestorId
packages/jaeger-ui/src/components/DeepDependencies/index.tsx
238: const hash = _get(graphState, 'model.hash');
397: graphState = _get(state.ddg, getStateEntryKey({ service, operation, start: 0, end: 0 }));
407: urlState: sanitizeUrlState(urlState, _get(graphState, 'model.hash')),
packages/jaeger-ui/src/components/TraceDiff/TraceDiffGraph/traceDiffGraphUtils.ts
23: if (_get(filterSpans(uiFind, _map(members, 'span')), 'size')) {
Requirement
The _get() function from lodash succeeds even when the path refers to properties that do not exist on the object (e.g. a bug fixed in #3592). There is no need for it when we can do a type-safe compiler-checked access, e.g.
Examples of usage: