Skip to content

Commit

Permalink
fix: github browser router
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 committed Sep 7, 2024
1 parent 58e7433 commit a19394c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/content-script.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,16 @@ const init = async (e: MouseEvent, isClick = false) => {
});
}

return initPropsMap.get(container);
const props = initPropsMap.get(container);
if (props) {
return {
...props,

// refresh file name and code, for browser router case (github)
fileName: req.getFileName(container),
code: await req.getCode(container),
};
}
}
};

Expand Down

0 comments on commit a19394c

Please sign in to comment.