Skip to content

Commit 4e1cde0

Browse files
authored
set default weight value (#78)
1 parent ce783e8 commit 4e1cde0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/views/schema/upstream/edit.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ export default class extends Vue {
255255
const nodes = {}
256256
this.form.nodes.map((item: any) => {
257257
if (item.ip && item.port && String(item.weights)) {
258-
nodes[`${item.ip}:${item.port}`] = Number(item.weights)
258+
nodes[`${item.ip}:${item.port}`] = Number(item.weights || 1)
259259
}
260260
})
261261

0 commit comments

Comments
 (0)