routing breaks when we click same link twice #422
This commit is contained in:
parent
ee0ab87c31
commit
9424cbb615
|
@ -99,7 +99,9 @@ const areTreeNodesEqual = (children1, children2) => {
|
||||||
|
|
||||||
let isEqual = false
|
let isEqual = false
|
||||||
for (let i = 0; i < children1.length; i++) {
|
for (let i = 0; i < children1.length; i++) {
|
||||||
isEqual = deepEqual(children1[i].context, children2[i].context)
|
isEqual =
|
||||||
|
deepEqual(children1[i].context, children2[i].context) &&
|
||||||
|
areTreeNodesEqual(children1[i].children, children2[i].children)
|
||||||
if (!isEqual) return false
|
if (!isEqual) return false
|
||||||
if (isScreenSlot(children1[i].parentNode.props._component)) {
|
if (isScreenSlot(children1[i].parentNode.props._component)) {
|
||||||
isEqual = deepEqual(children1[i].props, children2[i].props)
|
isEqual = deepEqual(children1[i].props, children2[i].props)
|
||||||
|
|
|
@ -78,13 +78,13 @@ export const createTreeNode = () => ({
|
||||||
get destroy() {
|
get destroy() {
|
||||||
const node = this
|
const node = this
|
||||||
return () => {
|
return () => {
|
||||||
if (node.unsubscribe) node.unsubscribe()
|
|
||||||
if (node.component && node.component.$destroy) node.component.$destroy()
|
|
||||||
if (node.children) {
|
if (node.children) {
|
||||||
for (let child of node.children) {
|
for (let child of node.children) {
|
||||||
child.destroy()
|
child.destroy()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (node.unsubscribe) node.unsubscribe()
|
||||||
|
if (node.component && node.component.$destroy) node.component.$destroy()
|
||||||
for (let onDestroyItem of node.onDestroy) {
|
for (let onDestroyItem of node.onDestroy) {
|
||||||
onDestroyItem()
|
onDestroyItem()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue