Skip to content

Commit 30d3aba

Browse files
authored
[pose-detection]Refactor code. (#657)
1 parent 34ac598 commit 30d3aba

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pose-detection/demo/src/option_panel.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,8 @@ function addMoveNetControllers(modelFolder, type) {
6767
...params.MOVENET_CONFIG
6868
};
6969

70-
let $type = type != null ? type : 'thunder';
71-
if ($type !== 'thunder' && $type !== 'lightning') {
72-
$type = 'thunder';
73-
}
74-
75-
params.STATE.model.type = $type;
70+
params.STATE.model.type =
71+
type !== 'thunder' && type !== 'lightning' ? 'thunder' : type;
7672

7773
const typeController =
7874
modelFolder.add(params.STATE.model, 'type', ['thunder', 'lightning']);

0 commit comments

Comments
 (0)