Skip to content

Commit 3590bd9

Browse files
authored
fix: remove lodash dependency (#277)
* Remove lodash dependency and replace isFunction with vanilla js function check * Add package-lock.json
1 parent d30b13c commit 3590bd9

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
"html-webpack-plugin": "^5.5.0",
7272
"jasmine-enzyme": "^7.1.2",
7373
"jest": "^26.6.3",
74-
"lodash": "^4.17.21",
7574
"prettier": "^2.4.1",
7675
"react": "^16.14.0",
7776
"react-bootstrap": "^1.6.4",

src/LinkContainer.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
useMatch,
77
useNavigate,
88
} from 'react-router-dom';
9-
import { isFunction } from 'lodash';
109

1110
const isModifiedEvent = (event) =>
1211
!!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
@@ -32,7 +31,7 @@ const LinkContainer = ({
3231
const child = React.Children.only(children);
3332

3433
const isActive = !!(getIsActive
35-
? isFunction(getIsActive)
34+
? typeof getIsActive === 'function'
3635
? getIsActive(match, location)
3736
: getIsActive
3837
: match);

0 commit comments

Comments
 (0)