fix(listeners) onPathElementClick: empty space (#171)

This commit is contained in:
coderaiser 2018-04-30 12:29:54 +03:00
parent 20afb1c1c9
commit 753db12b2d

View file

@ -16,6 +16,9 @@ const {
apiURL
} = require('../../common/cloudfunc');
const NBSP_REG = RegExp(String.fromCharCode(160), 'g');
const SPACE = ' ';
module.exports.init = () => {
contextMenu();
dragndrop();
@ -208,7 +211,9 @@ function onPathElementClick(panel, event) {
*/
link = link.replace('%%', '%25%');
link = decodeURI(link);
link = link.replace(RegExp('^' + prefix + FS), '') || '/';
link = link.replace(NBSP_REG, SPACE);
noCurrent = isNoCurrent(panel);