diff --git a/en/application-dev/reference/apis/js-apis-runninglock.md b/en/application-dev/reference/apis/js-apis-runninglock.md index 4a9ba2ab233a0e853ffb29d436ac8fd4e61dfe9b..1b25989357a2e101b5b6e95d05b5ca60dab2fb6f 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); } }) ```