fix(tree): reassign fullpath when register new node which the same current node (#2366)

* fix(tree): assign fullpath to current node by fullpath of new node if current node the same new node

* test(router-test): reverse the order when register router when test func GetFullPath

* chg(tree-test): update test case with register new route in TestRouteContextHoldsFullPath

Co-authored-by: vinhha <vinhha@vng.com.vn>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
vinhha96
2020-05-11 12:25:49 +07:00
committed by GitHub
parent d17270dd90
commit a6e8665e42
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -240,6 +240,7 @@ walk:
panic("handlers are already registered for path '" + fullPath + "'")
}
n.handlers = handlers
n.fullPath = fullPath
return
}
}