Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3578 from devtools-html/debugger.html/framework_f…
Browse files Browse the repository at this point in the history
…rames_redux

#2980 Add Redux Detection
  • Loading branch information
ksaldana1 authored and jasonLaster committed Aug 7, 2017
1 parent 6ce5b42 commit d404ee7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/images/Svg.js
Expand Up @@ -28,6 +28,7 @@ const svg = {
prettyPrint: require("./prettyPrint.svg"),
react: require("./react.svg"),
"regex-match": require("./regex-match.svg"),
redux: require("./redux.svg"),
resume: require("./resume.svg"),
settings: require("./settings.svg"),
stepIn: require("./stepIn.svg"),
Expand Down
7 changes: 7 additions & 0 deletions assets/images/redux.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/utils/frame.js
Expand Up @@ -71,6 +71,10 @@ function isAngular(frame) {
return getFrameUrl(frame).match(/angular/i);
}

function isRedux(frame) {
return getFrameUrl(frame).match(/redux/i);
}

export function getLibraryFromUrl(frame: Frame) {
// @TODO each of these fns calls getFrameUrl, just call it once
// (assuming there's not more complex logic to identify a lib)
Expand Down Expand Up @@ -130,6 +134,10 @@ export function getLibraryFromUrl(frame: Frame) {
if (isAngular(frame)) {
return "Angular";
}

if (isRedux(frame)) {
return "Redux";
}
}

const displayNameMap = {
Expand Down

0 comments on commit d404ee7

Please sign in to comment.