Skip to content

Commit

Permalink
Small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowbrickc authored Jan 21, 2019
1 parent e952417 commit b90ac8f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/proto.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ function child (bindings) {

function childBindings () {
const chindings = this[chindingsSym]
var chindingsObject = (chindings.indexOf(',') === 0) ? `{${chindings.substr(1)}}` : `{${chindings}}`
var chindingsJson = (chindings.indexOf(',') === 0) ? `{${chindings.substr(1)}}` : `{${chindings}}`
try {
var bindings = JSON.parse(chindingsObject) || {}
delete bindings['pid']
delete bindings['hostname']
var bindings = JSON.parse(chindingsJson) || {}
delete bindings.pid
delete bindings.hostname
return bindings
} catch (_) {
return {}
Expand Down

0 comments on commit b90ac8f

Please sign in to comment.