From 98c8f72763e00c31cc544757bdb69bc6f747e378 Mon Sep 17 00:00:00 2001 From: youqijing Date: Fri, 25 Mar 2022 15:30:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9display=E7=A4=BA=E4=BE=8B?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: youqijing Change-Id: Ic884cfce420283004d9211650453bd6167fe430b --- zh-cn/application-dev/reference/apis/js-apis-display.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-display.md b/zh-cn/application-dev/reference/apis/js-apis-display.md index 434103ed94..a0d79407b3 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-display.md +++ b/zh-cn/application-dev/reference/apis/js-apis-display.md @@ -67,7 +67,7 @@ getDefaultDisplay(callback: AsyncCallback<Display>): void ``` var displayClass = null; display.getDefaultDisplay((err, data) => { - if (err) { + if (err.code) { console.error('Failed to obtain the default display object. Code: ' + JSON.stringify(err)); return; } @@ -119,7 +119,7 @@ getAllDisplay(callback: AsyncCallback<Array<Display>>): void ``` display.getAllDisplay((err, data) => { - if (err) { + if (err.code) { console.error('Failed to obtain all the display objects. Code: ' + JSON.stringify(err)); return; } -- GitLab