Skip to content

Commit

Permalink
Workaround bublejs/buble#210 :(
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirbaio committed Jul 11, 2019
1 parent b3d2a86 commit 346d30c
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 66 deletions.
28 changes: 14 additions & 14 deletions dist/vue-router.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -2168,28 +2168,28 @@ function resolveQueues (
next,
equalLayers
) {
var ref, ref$1, ref$2, ref$3, ref$4;

var res = {
updated: [],
activated: [],
deactivated: []
};
var updated = [];
var activated = [];
var deactivated = [];

var min = Math.min(current.length, next.length);
for (var i = equalLayers; i < min; i++) {
var r = resolveQueue(current[i].matched, next[i].matched)
(ref = res.updated).push.apply(ref, r.updated)
(ref$1 = res.activated).push.apply(ref$1, r.activated)
(ref$2 = res.deactivated).push.apply(ref$2, r.deactivated);
var r = resolveQueue(current[i].matched, next[i].matched);
updated.push.apply(updated, r.updated);
activated.push.apply(activated, r.activated);
deactivated.push.apply(deactivated, r.deactivated);
}
for (var i$1 = min; i$1 < current.length; i$1++) {
(ref$3 = res.deactivated).push.apply(ref$3, current[i$1].matched);
deactivated.push.apply(deactivated, current[i$1].matched);
}
for (var i$2 = min; i$2 < next.length; i$2++) {
(ref$4 = res.activated).push.apply(ref$4, next[i$2].matched);
activated.push.apply(activated, next[i$2].matched);
}
return {
updated: updated,
activated: activated,
deactivated: deactivated
}
return res
}

function resolveQueue (
Expand Down
24 changes: 13 additions & 11 deletions dist/vue-router.esm.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2148,26 +2148,28 @@ function resolveQueues (
next,
equalLayers
) {
const res = {
updated: [],
activated: [],
deactivated: []
};
const updated = [];
const activated = [];
const deactivated = [];

const min = Math.min(current.length, next.length);
for (let i = equalLayers; i < min; i++) {
const r = resolveQueue(current[i].matched, next[i].matched);
res.updated.push(...r.updated);
res.activated.push(...r.activated);
res.deactivated.push(...r.deactivated);
updated.push(...r.updated);
activated.push(...r.activated);
deactivated.push(...r.deactivated);
}
for (let i = min; i < current.length; i++) {
res.deactivated.push(...current[i].matched);
deactivated.push(...current[i].matched);
}
for (let i = min; i < next.length; i++) {
res.activated.push(...next[i].matched);
activated.push(...next[i].matched);
}
return {
updated,
activated,
deactivated
}
return res
}

function resolveQueue (
Expand Down
2 changes: 1 addition & 1 deletion dist/vue-router.esm.browser.min.js

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions dist/vue-router.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2166,28 +2166,28 @@ function resolveQueues (
next,
equalLayers
) {
var ref, ref$1, ref$2, ref$3, ref$4;

var res = {
updated: [],
activated: [],
deactivated: []
};
var updated = [];
var activated = [];
var deactivated = [];

var min = Math.min(current.length, next.length);
for (var i = equalLayers; i < min; i++) {
var r = resolveQueue(current[i].matched, next[i].matched)
(ref = res.updated).push.apply(ref, r.updated)
(ref$1 = res.activated).push.apply(ref$1, r.activated)
(ref$2 = res.deactivated).push.apply(ref$2, r.deactivated);
var r = resolveQueue(current[i].matched, next[i].matched);
updated.push.apply(updated, r.updated);
activated.push.apply(activated, r.activated);
deactivated.push.apply(deactivated, r.deactivated);
}
for (var i$1 = min; i$1 < current.length; i$1++) {
(ref$3 = res.deactivated).push.apply(ref$3, current[i$1].matched);
deactivated.push.apply(deactivated, current[i$1].matched);
}
for (var i$2 = min; i$2 < next.length; i$2++) {
(ref$4 = res.activated).push.apply(ref$4, next[i$2].matched);
activated.push.apply(activated, next[i$2].matched);
}
return {
updated: updated,
activated: activated,
deactivated: deactivated
}
return res
}

function resolveQueue (
Expand Down
28 changes: 14 additions & 14 deletions dist/vue-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -2172,28 +2172,28 @@ function resolveQueues (
next,
equalLayers
) {
var ref, ref$1, ref$2, ref$3, ref$4;

var res = {
updated: [],
activated: [],
deactivated: []
};
var updated = [];
var activated = [];
var deactivated = [];

var min = Math.min(current.length, next.length);
for (var i = equalLayers; i < min; i++) {
var r = resolveQueue(current[i].matched, next[i].matched)
(ref = res.updated).push.apply(ref, r.updated)
(ref$1 = res.activated).push.apply(ref$1, r.activated)
(ref$2 = res.deactivated).push.apply(ref$2, r.deactivated);
var r = resolveQueue(current[i].matched, next[i].matched);
updated.push.apply(updated, r.updated);
activated.push.apply(activated, r.activated);
deactivated.push.apply(deactivated, r.deactivated);
}
for (var i$1 = min; i$1 < current.length; i$1++) {
(ref$3 = res.deactivated).push.apply(ref$3, current[i$1].matched);
deactivated.push.apply(deactivated, current[i$1].matched);
}
for (var i$2 = min; i$2 < next.length; i$2++) {
(ref$4 = res.activated).push.apply(ref$4, next[i$2].matched);
activated.push.apply(activated, next[i$2].matched);
}
return {
updated: updated,
activated: activated,
deactivated: deactivated
}
return res
}

function resolveQueue (
Expand Down
2 changes: 1 addition & 1 deletion dist/vue-router.min.js

Large diffs are not rendered by default.

24 changes: 13 additions & 11 deletions src/history/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,26 +258,28 @@ function resolveQueues (
activated: Array<RouteRecord>,
deactivated: Array<RouteRecord>
} {
const res = {
updated: [],
activated: [],
deactivated: []
}
const updated = []
const activated = []
const deactivated = []

const min = Math.min(current.length, next.length)
for (let i = equalLayers; i < min; i++) {
const r = resolveQueue(current[i].matched, next[i].matched)
res.updated.push(...r.updated)
res.activated.push(...r.activated)
res.deactivated.push(...r.deactivated)
updated.push(...r.updated)
activated.push(...r.activated)
deactivated.push(...r.deactivated)
}
for (let i = min; i < current.length; i++) {
res.deactivated.push(...current[i].matched)
deactivated.push(...current[i].matched)
}
for (let i = min; i < next.length; i++) {
res.activated.push(...next[i].matched)
activated.push(...next[i].matched)
}
return {
updated,
activated,
deactivated
}
return res
}

function resolveQueue (
Expand Down

0 comments on commit 346d30c

Please sign in to comment.