From c6460f09aab3a834121dc58fc5880c81a65147ef Mon Sep 17 00:00:00 2001 From: Guillaume Chau Date: Tue, 20 Apr 2021 18:29:50 +0200 Subject: [PATCH] fix(devtools): stabilize record id (#897) --- src/devtools.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/devtools.ts b/src/devtools.ts index 43f2e1e85..97677dabc 100644 --- a/src/devtools.ts +++ b/src/devtools.ts @@ -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,