From 31c84265aae27f791563068d638a84c484cd99dd Mon Sep 17 00:00:00 2001 From: Sahar Mehrpour Date: Wed, 2 May 2018 15:13:31 -0400 Subject: [PATCH] fixed bug --- src/appManager/hashManager.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/appManager/hashManager.js b/src/appManager/hashManager.js index acbd73b..a6e02d2 100644 --- a/src/appManager/hashManager.js +++ b/src/appManager/hashManager.js @@ -31,9 +31,15 @@ class HashManager { // [hash, values] PubSub.subscribe('UPDATE_HASH', (msg, data) => { - if(!this.ignoreFile) { + if (!this.ignoreFile) { if (data.length > 0) - data.forEach((d, i, a) => a[i] = d.replace('/Users/saharmehrpour/Documents/Workspace/', '').replace(/\//g, '%2F')); + data.forEach((d, i, a) => { + try { + a[i] = d.replace('/Users/saharmehrpour/Documents/Workspace/', '').replace(/\//g, '%2F') + } catch (err) { + a[i] = d + } + }); window.location.hash = '#/' + data.join('/'); } else