As mentioned earlier, navigating away will cause path here to be null, this should probably be changed to:

```javascript
return path && path[0] !== '/' ?  '/' + path : path;
```