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

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

commit b5e74637105333b6a9d96d03739b7fbe3b8218d0
Author: juzhiyuan <[email protected]>
AuthorDate: Wed Dec 2 19:11:07 2020 +0800

    fix: use correct method to get object's length
---
 web/src/pages/Route/transform.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/src/pages/Route/transform.ts b/web/src/pages/Route/transform.ts
index 66d9fe1..bb9687e 100644
--- a/web/src/pages/Route/transform.ts
+++ b/web/src/pages/Route/transform.ts
@@ -63,7 +63,7 @@ export const transformStepData = ({
     }
 
     if (redirect.http_to_https) {
-      if (Object(data.plugins).length === 0) {
+      if (Object.keys(data.plugins!).length === 0) {
         data.plugins = {};
       }
       data.plugins!.redirect = redirect;

Reply via email to