mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:21:16 +02:00
userdata
This commit is contained in:
parent
fa0a740370
commit
5fef23ae34
1 changed files with 4 additions and 3 deletions
|
@ -310,16 +310,17 @@
|
||||||
results.forEach(function(result) {
|
results.forEach(function(result) {
|
||||||
var properties = Entities.getEntityProperties(result);
|
var properties = Entities.getEntityProperties(result);
|
||||||
|
|
||||||
if (userData === "") {
|
if (properties.userData === "" || properties.userData === undefined) {
|
||||||
print('no userdata -- its blank')
|
print('no userdata -- its blank or undefined')
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var userData = null;
|
var userData = null;
|
||||||
try {
|
try {
|
||||||
userData = JSON.parse(properties.userData);
|
userData = JSON.parse(properties.userData);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
print('error parsing json in resetscript for: ' + properties.name);
|
print('error parsing json in resetscript for: ' + properties.name);
|
||||||
print('properties are:' + properties.userData);
|
//print('properties are:' + properties.userData);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (userData.hasOwnProperty('hifiHomeKey')) {
|
if (userData.hasOwnProperty('hifiHomeKey')) {
|
||||||
|
|
Loading…
Reference in a new issue