Skip to content

Commit

Permalink
Fixes ObjectsFields Null Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
RotaruDan committed May 3, 2018
1 parent e12a731 commit 5470b00
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"recover": "node ./bin/permissions-recover.js"
},
"dependencies": {
"adjective-adjective-animal": "*",
"adm-zip": "*",
"adjective-adjective-animal": "1.3.3",
"adm-zip": "0.4.7",
"async": "^1.3.x",
"body-parser": "^1.13.x",
"co": "4.6.x",
Expand Down
16 changes: 8 additions & 8 deletions routes/kibana.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ var defaultObject = {
name: '',
gameplayId: '',
type_hashCode: 0,
score: 0,
score: 0.01,
response: '',
type: '',
event_hashcode: 0,
Expand All @@ -400,14 +400,14 @@ var defaultObject = {
timestamp: '2000-01-19T11:05:27.772Z',
target_hashCode: 0,
stored: '2000-01-19T11:05:27.772Z',
progress: 0,
time: 0,
progress: 0.01,
time: 0.01,
ext: {
progress: 0,
time: 0,
progress: 0.01,
time: 0.01,
location: {
lat: 0,
lon: 0
lat: 0.01,
lon: 0.01
}
}
}
Expand Down Expand Up @@ -1000,7 +1000,7 @@ router.post('/index/:indexTemplate/:indexName', function (req, res) {
q: '_id:' + 'object_fields' + versionId
}, function (error, response) {

if (response.hits.hits && response.hits.hits.length > 0) {
if (!error && response.hits && response.hits.hits && response.hits.hits.length > 0) {
objectfields = response.hits.hits[0]._source;
}

Expand Down

0 comments on commit 5470b00

Please sign in to comment.