mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix sortable handle
This commit is contained in:
1 parent
4918f41eac
commit
51527c7f79
3 files changed
+3
-3
No files matched your search
@@ -22,7 +22,7 @@ export interface ProblemDoc extends Document { }
|
||||
export type Field = keyof ProblemDoc;
|
||||
|
||||
function sortable(source: string) {
|
||||
return source.replace(/(\d+)/g, (str) => '0'.repeat(6 - str.length) + str);
|
||||
return source.replace(/(\d+)/g, (str) => (str.length >= 6 ? str : ('0'.repeat(6 - str.length) + str)));
|
||||
}
|
||||
|
||||
export class ProblemModel {
|
||||
|
||||
Reference in new issue
Block a user