Commit d07063ab authored by Robert Knight's avatar Robert Knight

Remove unnecessary lodash.get dependency

In the one place we use it, this can be replaced with a trivial helper.
parent 2eccd4c4
......@@ -77,7 +77,6 @@
"karma-sinon": "^1.0.5",
"katex": "^0.11.0",
"lodash.debounce": "^4.0.3",
"lodash.get": "^4.3.0",
"loose-envify": "^1.4.0",
"mocha": "^7.0.0",
"node-uuid": "^1.4.3",
......
import get from 'lodash.get';
import * as queryString from 'query-string';
import { replaceURLParams } from '../util/url';
......@@ -77,6 +76,14 @@ function stripInternalProperties(obj) {
// istanbul ignore next
const noop = () => null;
function get(object, path) {
let cursor = object;
path.split('.').forEach(segment => {
cursor = cursor[segment];
});
return cursor;
}
/**
* Creates a function that will make an API call to a named route.
*
......
......@@ -5186,7 +5186,7 @@ lodash.flattendeep@^4.4.0:
resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2"
integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=
lodash.get@^4.3.0, lodash.get@^4.4.2:
lodash.get@^4.4.2:
version "4.4.2"
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment