Skip to content

Commit e6ace8d

Browse files
committed
3.2.2 version
1 parent 3b451cd commit e6ace8d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "remix-development-tools",
33
"description": "Remix development tools - a set of tools for developing/debugging Remix.run apps",
44
"author": "Alem Tuzlak",
5-
"version": "3.2.1",
5+
"version": "3.2.2",
66
"license": "MIT",
77
"keywords": [
88
"remix",

src/RemixDevTools/hooks/useBorderedRoutes.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,14 @@ export function useBorderedRoutes() {
4848
traverseComponentTree(rootFiber.current, (fiberNode: any) => {
4949
if (isSourceElement(fiberNode)) {
5050
const isJsx = isJsxFile(fiberNode);
51-
const line = fiberNode?._debugSource?.lineNumber;
51+
52+
const originalSource = fiberNode?._debugSource;
53+
const source = fiberNode?._debugOwner?._debugSource ?? fiberNode?._debugSource;
54+
const line = source?.fileName?.startsWith("/") ? originalSource?.lineNumber : source?.lineNumber;
55+
const fileName = source?.fileName?.startsWith("/") ? originalSource?.fileName : source?.fileName;
5256
fiberNode.stateNode?.setAttribute?.(
5357
"data-rdt-source",
54-
`${fiberNode._debugSource.fileName}:${isJsx ? line - 20 : line}` //
58+
`${fileName}:${isJsx ? line - 20 : line}` //
5559
);
5660
}
5761
if (fiberNode?.elementType?.name === "default" || fiberNode?.elementType?.name === "RenderedRoute") {

0 commit comments

Comments
 (0)