mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-22 07:05:24 +00:00
Fix typo
This commit is contained in:
@@ -249,7 +249,7 @@ type Part = {
|
|||||||
spread?: boolean;
|
spread?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
function is_spead(path: string) {
|
function is_spread(path: string) {
|
||||||
const spread_pattern = /\[\.{3}/g;
|
const spread_pattern = /\[\.{3}/g;
|
||||||
return spread_pattern.test(path)
|
return spread_pattern.test(path)
|
||||||
}
|
}
|
||||||
@@ -259,9 +259,9 @@ function comparator(
|
|||||||
b: { basename: string, parts: Part[], file: string, is_index: boolean }
|
b: { basename: string, parts: Part[], file: string, is_index: boolean }
|
||||||
) {
|
) {
|
||||||
if (a.is_index !== b.is_index) {
|
if (a.is_index !== b.is_index) {
|
||||||
if (a.is_index) return is_spead(a.file) ? 1 : -1;
|
if (a.is_index) return is_spread(a.file) ? 1 : -1;
|
||||||
|
|
||||||
return is_spead(b.file) ? -1 : 1;
|
return is_spread(b.file) ? -1 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const max = Math.max(a.parts.length, b.parts.length);
|
const max = Math.max(a.parts.length, b.parts.length);
|
||||||
|
|||||||
Reference in New Issue
Block a user