fix: typo in logic of getStateFromPath (#8868)

What just randomly reading, but I think there's a typo
```
['ab', 'aba'].sort((a, b) => {
      if (a.startsWith(b)) {
        return -1;
      }

      if (b.startsWith(a)) {
        return 1;
      }
});
(2) ["aba", "ab"]
['ab', 'a'].sort((a, b) => {
      if (a.startsWith(b)) {
        return -1;
      }

      if (b.startsWith(a)) {
        return 1;
      }
});
(2) ["ab", "a"]
```
This commit is contained in:
Thibault Malbranche
2020-09-21 13:00:44 +02:00
committed by GitHub
parent 050447b9ac
commit 97c215d2f2

View File

@@ -122,7 +122,7 @@ export default function getStateFromPath(
// If one of the patterns starts with the other, it's more exhaustive
// So move it up
if (a.pattern.startsWith(b.pattern)) {
return 1;
return -1;
}
if (b.pattern.startsWith(a.pattern)) {