From 76064182b583c79f8fcaa81d7df62cb35db6f3a8 Mon Sep 17 00:00:00 2001 From: haolihi <1252445494@qq.com> Date: Thu, 1 Dec 2022 16:21:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=96=B0=E9=97=BB=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E8=BF=94=E5=9B=9E=E4=B8=BB=E9=A1=B5=E9=97=AA?= =?UTF-8?q?=E9=80=80=E9=97=AE=E9=A2=98=EF=BC=8C#19598?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: haolihi <1252445494@qq.com> --- .../entry/src/main/js/MainAbility/pages/detail/detail.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Distributed/NewsDemo/entry/src/main/js/MainAbility/pages/detail/detail.js b/Distributed/NewsDemo/entry/src/main/js/MainAbility/pages/detail/detail.js index cbeacd77..0486ddbd 100644 --- a/Distributed/NewsDemo/entry/src/main/js/MainAbility/pages/detail/detail.js +++ b/Distributed/NewsDemo/entry/src/main/js/MainAbility/pages/detail/detail.js @@ -110,6 +110,8 @@ export default { }, onDestroy() { - this.deviceMag.release(); + if (this.deviceMag !== null && JSON.stringify(this.deviceMag) !== '{}') { + this.deviceMag.release(); + } } }; -- Gitee