[Service] Fix virtual path issue 74/261174/2 submit/tizen/20210713.160029
authorDong Hyun, Song <dh81.song@samsung.com>
Tue, 13 Jul 2021 02:10:29 +0000 (11:10 +0900)
committerDong Hyun, Song <dh81.song@samsung.com>
Tue, 13 Jul 2021 03:45:44 +0000 (12:45 +0900)
Remove optional chaining.
getter was disabled by webapis side.

Change-Id: Ia619f6ca6b933e686f3444afe2243c284a1e8768
Signed-off-by: Dong Hyun, Song <dh81.song@samsung.com>
wrt_app/service/device_api_router.ts

index 5dda076..1799792 100644 (file)
@@ -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() {