Fixes #859 Stopped JS error manifesting in the behaviour stated in #859
Merge pull request #863 from aodn/issue-859

Fixes #859 Stopped JS error manifesting in the behaviour stated in #859