Skip to content

Commit 55febe4

Browse files
committed
fix: reorder boolean logic
1 parent 75e8ae1 commit 55febe4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/org-binder/org-task-runner.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,16 @@ export class TaskRunner {
2626
await task.perform(task);
2727
task.done = true;
2828
if (task.result) {
29-
if ('PhysicalId' in task.result) {
30-
line += ` (${task.result.PhysicalId})`;
29+
if (typeof task.result !== 'object'){
30+
line += ` (${task.result})`;
31+
} else if ('PhysicalId' in task.result) {
32+
if (task.result.PhysicalId !== undefined) {
33+
line += ` (${task.result.PhysicalId})`;
34+
}
3135
} else if ('commercial' in task.result) {
3236
if (task.result.commercial !== undefined) {
3337
line += ` (${task.result.commercial})`;
3438
}
35-
} else if (typeof task.result !== 'object'){
36-
line += ` (${task.result})`;
3739
}
3840
}
3941

0 commit comments

Comments
 (0)