Jorge Bay created TINKERPOP-2332:
------------------------------------

             Summary: JavaScript GLV: structure element toString() should 
internally call toString()
                 Key: TINKERPOP-2332
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2332
             Project: TinkerPop
          Issue Type: Bug
    Affects Versions: 3.4.4, 3.3.9
            Reporter: Jorge Bay
            Assignee: Jorge Bay
             Fix For: 3.4.5, 3.3.10


Structure classes use String instance methods on properties that might not be 
strings.

For example, current implementation:

{code:javascript}
class Property {
  // ...

  toString() {
    return 'p[' + this.key + '->' + this.value.substr(0, 20) + ']';
  }
}
{code}

Should be:

{code:javascript}
class Property {
  // ...

  toString() {
    return 'p[' + this.key + '->' + this.value.toString().substr(0, 20) + ']';
  }
}
{code}

Plus checking on null/undefined value.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to