From 5fd1a5d24366278ed62e52e8ab00bfb990bdf016 Mon Sep 17 00:00:00 2001 From: ShiJie Date: Fri, 15 Apr 2022 17:49:29 +0800 Subject: [PATCH] fix: Modify createrunninglock sample error Signed-off-by: ShiJie Change-Id: If27a9722abb2d619182156463c6edb8af18bbb5f --- en/application-dev/reference/apis/js-apis-runninglock.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-runninglock.md b/en/application-dev/reference/apis/js-apis-runninglock.md index 4a9ba2ab23..1b25989357 100644 --- a/en/application-dev/reference/apis/js-apis-runninglock.md +++ b/en/application-dev/reference/apis/js-apis-runninglock.md @@ -109,13 +109,13 @@ Creates a **RunningLock** object. ``` runningLock.createRunningLock("running_lock_test", runningLock.RunningLockType.BACKGROUND, (error, lockIns) => { if (typeof error === "undefined") { - console.log('create runningLock test error: ' + error); - } else { var used = lockIns.isUsed(); console.info('runninglock is used: ' + used); lockIns.lock(500); used = lockIns.isUsed(); console.info('after lock runninglock is used ' + used); + } else { + console.log('create runningLock test error: ' + error); } }) ``` -- GitLab