Skip to content

Commit

Permalink
fix(devtools): stabilize record id (#897)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Apr 20, 2021
1 parent 1626db7 commit c6460f0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/devtools.ts
Expand Up @@ -435,8 +435,11 @@ function formatRouteRecordForInspector(

// add an id to be able to select it. Using the `path` is not possible because
// empty path children would collide with their parents
let id = String(routeRecordId++)
;(record as any).__vd_id = id
let id = (record as any).__vd_id
if (id == null) {
id = String(routeRecordId++)
;(record as any).__vd_id = id
}

return {
id,
Expand Down

0 comments on commit c6460f0

Please sign in to comment.