Showing the changes to scripts/tutorials (1 of 1 file). Show all
Unified · Split
| @@ -16,14 +16,21 @@ location.hostChanged.connect(function(host) { · 15 unmodified lines | ||
| 16 | 16 | |
| 17 | 17 | // Fetch the domain ID from the metaverse |
| 18 | 18 | var placeData = request(SERVER + '/places/' + host); |
| 19 | − if (!placeData) { return; } | |
| 19 | + if (!placeData) { | |
| 20 | + print('Cannot find place name - abandoning metadata request for', host); | |
| 21 | + return; | |
| 22 | + | |
| 23 | + } | |
| 20 | 24 | var domainID = placeData.data.place.domain.id; |
| 21 | 25 | print('Domain ID:', domainID); |
| 22 | 26 | |
| 23 | 27 | // Fetch the domain metadata from the metaverse |
| 24 | 28 | var domainData = request(SERVER + '/domains/' + domainID); |
| 25 | 29 | print(SERVER + '/domains/' + domainID); |
| 26 | − if (!domainData) { return; } | |
| 30 | + if (!domainData) { | |
| 31 | + print('Cannot find domain data - abandoning metadata request for', domainID); | |
| 32 | + return; | |
| 33 | + } | |
| 27 | 34 | var metadata = domainData.domain; |
| 28 | 35 | print('Domain metadata:', JSON.stringify(metadata)); |
| 29 | 36 | |