From 07258778ff84d59d4bb071ab184a83a354e0a7e2 Mon Sep 17 00:00:00 2001 From: Isayama_kagura Date: Sat, 31 Oct 2020 09:25:57 +0800 Subject: [PATCH] Fix Bug --- config/yeekitApi.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/config/yeekitApi.js b/config/yeekitApi.js index 727b956..97e101e 100644 --- a/config/yeekitApi.js +++ b/config/yeekitApi.js @@ -9,14 +9,12 @@ var requestTranslation = function (){ 'targetLang':'nzh' } }).then(string => { - json=JSON.parse(string); + var json=JSON.parse(string); json = json[0]; json=JSON.parse(json); - json = json.translation; - json = json[0]; + json = (json.translation)[0]; + json = (json.translated)[0]; - json = json.translated; - json = json[0]; var result = json.text; callback(result);