Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Sahar Mehrpour authored and Sahar Mehrpour committed May 2, 2018
1 parent 3d4202f commit 31c8426
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/appManager/hashManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 31c8426

Please sign in to comment.