Skip to content

Commit 662d6b6

Browse files
committed
preserve order as before
1 parent 7221934 commit 662d6b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/commands.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ export async function task(contest_id: string | undefined, task_id: string | und
5454
const f_url = options.url === true;
5555
const f_label = options.label === true;
5656

57-
// in case all flags are false (no print options specified), the whole (label, title, id, url string) is printed
58-
const format = ({id, label, title, url}: Task) => formatAsShellOutput([((f_label || f_id || f_url || f_label) ? [f_label ? SGR(label, 32) : null, f_title ? SGR(title, 32, 1) : null, f_id ? SGR(id, 37) : null, f_url ? url : null].filter(e => e !== null) : [SGR(label, 32), SGR(title, 32, 1), SGR(id, 37), url]) as Array<string>]);
57+
// in case all flags are false (no print options specified), the whole (id, label, title, url string) is printed
58+
const format = ({id, label, title, url}: Task) => formatAsShellOutput([((f_id || f_label || f_title || f_url) ? [f_id ? SGR(id, 37) : null, f_label ? SGR(label, 32) : null, f_title ? SGR(title, 32, 1) : null, f_url ? url : null].filter(e => e !== null) : [SGR(id, 37), SGR(label, 32), SGR(title, 32, 1), url]) as Array<string>]);
5959
if (contest_id === undefined && task_id === undefined) {
6060
// idが与えられていない場合、プロジェクトファイルを探す
6161
try {

0 commit comments

Comments
 (0)