You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2019/11/22 11:12:29 UTC

[incubator-apisix-dashboard] 01/01: set default weight value

This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch fix-weights
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git

commit 46720187d5ca6aa309f2a43e169a9dcdcd17583a
Author: juzhiyuan <jj...@gmail.com>
AuthorDate: Fri Nov 22 19:11:23 2019 +0800

    set default weight value
---
 src/views/schema/upstream/edit.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/views/schema/upstream/edit.vue b/src/views/schema/upstream/edit.vue
index 953f94c..769c576 100644
--- a/src/views/schema/upstream/edit.vue
+++ b/src/views/schema/upstream/edit.vue
@@ -255,7 +255,7 @@ export default class extends Vue {
       const nodes = {}
       this.form.nodes.map((item: any) => {
         if (item.ip && item.port && String(item.weights)) {
-          nodes[`${item.ip}:${item.port}`] = Number(item.weights)
+          nodes[`${item.ip}:${item.port}`] = Number(item.weights || 1)
         }
       })