vue-router-transition icon indicating copy to clipboard operation
vue-router-transition copied to clipboard

did NOT handler history record properly

Open hughgr opened this issue 8 years ago • 0 comments

thanks for sharing such a wonderful plugin, but the code handle history record do NOT work properly.

 if (toStackIndex > -1) {
            direction = toStackIndex > fromStackIndex ? DIRECTION.FORWARD : DIRECTION.BACK;
    } else {
            direction = DIRECTION.FORWARD;
            stack.push(toPath);
            sessionStorage.setItem(HIS_KEY, JSON.stringify(stack));
          }

for example if I A->B1->C then i back to A, the history record stack still remains [A,B1,C] then i go to B2, the stack was like [A,B1,C,B2], then i move to C, oops, the C was in record and index is smaller then B2 so we get "back" instead of "forward"

hughgr avatar Sep 20 '16 03:09 hughgr