Avoid failure when currentLocation not yet initialised

This commit is contained in:
Tony Garnock-Jones 2016-06-20 11:01:49 -04:00
parent e5a38d5fe5
commit 95c17a190c
1 changed files with 3 additions and 1 deletions

View File

@ -63,7 +63,9 @@ ground dataspace G {
assert toBroker(wsurl, currentLocation) when (currentLocation);
on message Syndicate.UI.globalEvent('#my_email', 'change', _) {
localStorage.my_email = currentLocation[1] = email_element.value.trim();
var v = email_element.value.trim();
if (currentLocation) currentLocation[1] = v;
localStorage.my_email = v;
}
on message Syndicate.UI.globalEvent('#group', 'change', _) {