Fixing share JS error

Steps to reproduce:
- open js console
- open share dialog
- click "Share with link"

Console output: Uncaught TypeError: Cannot set property 'link' of undefined