Skip to content

Commit 31c8426

Browse files
Sahar MehrpourSahar Mehrpour
authored andcommitted
fixed bug
1 parent 3d4202f commit 31c8426

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/appManager/hashManager.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,15 @@ class HashManager {
3131

3232
// [hash, values]
3333
PubSub.subscribe('UPDATE_HASH', (msg, data) => {
34-
if(!this.ignoreFile) {
34+
if (!this.ignoreFile) {
3535
if (data.length > 0)
36-
data.forEach((d, i, a) => a[i] = d.replace('/Users/saharmehrpour/Documents/Workspace/', '').replace(/\//g, '%2F'));
36+
data.forEach((d, i, a) => {
37+
try {
38+
a[i] = d.replace('/Users/saharmehrpour/Documents/Workspace/', '').replace(/\//g, '%2F')
39+
} catch (err) {
40+
a[i] = d
41+
}
42+
});
3743
window.location.hash = '#/' + data.join('/');
3844
}
3945
else

0 commit comments

Comments
 (0)