From 24027515bc2fbb12f6020608d242d1df438fe816 Mon Sep 17 00:00:00 2001 From: "Dong Hyun, Song" Date: Tue, 13 Jul 2021 11:10:29 +0900 Subject: [PATCH] [Service] Fix virtual path issue Remove optional chaining. getter was disabled by webapis side. Change-Id: Ia619f6ca6b933e686f3444afe2243c284a1e8768 Signed-off-by: Dong Hyun, Song --- wrt_app/service/device_api_router.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/wrt_app/service/device_api_router.ts b/wrt_app/service/device_api_router.ts index 5dda076..1799792 100644 --- a/wrt_app/service/device_api_router.ts +++ b/wrt_app/service/device_api_router.ts @@ -310,11 +310,15 @@ export class DeviceAPIRouter { } refineFilesystemApis() { - let virtualPath = ['wgt-private', 'wgt-private-tmp', 'wgt-package']; - virtualPath.forEach(name => { - let realPath = wrt.resolveVirtualRoot(this.getServiceId(), name); - global.tizen.filesystem.setVirtualPath?.(name, realPath, 'INTERVAL', 'MOUNTED'); - }); + try { + let virtualPath = ['wgt-private', 'wgt-private-tmp', 'wgt-package']; + virtualPath.forEach(name => { + let realPath = wrt.resolveVirtualRoot(this.getServiceId(), name); + global.tizen.filesystem.setVirtualPath(name, realPath, 'INTERVAL', 'MOUNTED'); + }); + } catch (e) { + console.log(`refineFilesystemApis has an error ${e}`); + } } refineXwalkUtilApis() { -- 2.7.4