Skip to content

Commit 0926737

Browse files
committed
Allow setting default primitive values
1 parent be86525 commit 0926737

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

frontend/src/components/common/NumberInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const emit = defineEmits<{
99
}>();
1010
1111
const updateValue = (value: string | number | null) => {
12-
if (value) {
12+
if (value !== null) {
1313
if (typeof value === 'string') {
1414
emit('update:modelValue', parseInt(value))
1515
} else {

frontend/src/components/team/ChallengeFlagsInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const model = computed(() => {
1717
})
1818
1919
const updateValue = (value: number | undefined) => {
20-
if (value) {
20+
if (value !== undefined) {
2121
control?.UpdateTeamState({
2222
forTeam: props.team,
2323
challengeFlagsLeft: value,

frontend/src/components/team/GoalCountInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const model = computed(() => {
1717
})
1818
1919
const updateValue = (value: number | undefined) => {
20-
if (value) {
20+
if (value !== undefined) {
2121
control?.UpdateTeamState({
2222
forTeam: props.team,
2323
goals: value,

frontend/src/components/team/GoalKeeperIdInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const currentKeeperId = computed(() => {
1717
})
1818
1919
const updateValue = (value: number | undefined) => {
20-
if (value) {
20+
if (value !== undefined) {
2121
control?.UpdateTeamState({
2222
forTeam: props.team,
2323
goalkeeper: value,

frontend/src/components/team/PlacementFailuresInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const model = computed(() => {
1717
})
1818
1919
const updateValue = (value: number | undefined) => {
20-
if (value) {
20+
if (value !== undefined) {
2121
control?.UpdateTeamState({
2222
forTeam: props.team,
2323
ballPlacementFailures: value,

frontend/src/components/team/TimeoutTimeLeftInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const model = computed(() => {
1717
})
1818
1919
const updateValue = (value: number | undefined) => {
20-
if (value) {
20+
if (value !== undefined) {
2121
control?.UpdateTeamState({
2222
forTeam: props.team,
2323
timeoutTimeLeft: value.toString(),

frontend/src/components/team/TimeoutsLeftInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const model = computed(() => {
1717
})
1818
1919
const updateValue = (value: number | undefined) => {
20-
if (value) {
20+
if (value !== undefined) {
2121
control?.UpdateTeamState({
2222
forTeam: props.team,
2323
timeoutsLeft: value,

frontend/src/components/team/YellowCardTimeLeftInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const model = computed(() => {
1717
})
1818
1919
const updateValue = (value: number | undefined) => {
20-
if (value) {
20+
if (value !== undefined) {
2121
control?.UpdateTeamState({
2222
forTeam: props.team,
2323
yellowCard: {

0 commit comments

Comments
 (0)