From 52ad6bcf0aa168e101c8dd0a1c4d361bfec3d5b8 Mon Sep 17 00:00:00 2001 From: fuchao Date: Wed, 28 Sep 2022 16:39:31 +0800 Subject: [PATCH] fix example code error Signed-off-by: fuchao --- en/application-dev/reference/apis/js-apis-socket.md | 4 ++-- zh-cn/application-dev/reference/apis/js-apis-socket.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-socket.md b/en/application-dev/reference/apis/js-apis-socket.md index b590efb7ca..77dd0bc056 100644 --- a/en/application-dev/reference/apis/js-apis-socket.md +++ b/en/application-dev/reference/apis/js-apis-socket.md @@ -1041,7 +1041,7 @@ promise1.then(() => { console.log('connect success'); let promise2 = tcp.getRemoteAddress(); promise2.then(() => { - console.log('getRemoteAddress success:' + JSON.stringify(data)); + console.log('getRemoteAddress success'); }).catch(err => { console.log('getRemoteAddressfail'); }); @@ -1120,7 +1120,7 @@ promise.then(() => { console.log('connect success'); let promise1 = tcp.getState(); promise1.then(() => { - console.log('getState success:' + JSON.stringify(data)); + console.log('getState success'); }).catch(err => { console.log('getState fail'); }); diff --git a/zh-cn/application-dev/reference/apis/js-apis-socket.md b/zh-cn/application-dev/reference/apis/js-apis-socket.md index ee4067ce48..078dbaf17a 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-socket.md +++ b/zh-cn/application-dev/reference/apis/js-apis-socket.md @@ -1041,7 +1041,7 @@ promise1.then(() => { console.log('connect success'); let promise2 = tcp.getRemoteAddress(); promise2.then(() => { - console.log('getRemoteAddress success:' + JSON.stringify(data)); + console.log('getRemoteAddress success'); }).catch(err => { console.log('getRemoteAddressfail'); }); @@ -1120,7 +1120,7 @@ promise.then(() => { console.log('connect success'); let promise1 = tcp.getState(); promise1.then(() => { - console.log('getState success:' + JSON.stringify(data)); + console.log('getState success'); }).catch(err => { console.log('getState fail'); }); -- GitLab