You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2019/01/14 14:41:40 UTC
[GitHub] jorgebay commented on a change in pull request #1038:
TINKERPOP-2130 Fix default parameter assignment in Connection ctor
jorgebay commented on a change in pull request #1038: TINKERPOP-2130 Fix default parameter assignment in Connection ctor
URL: https://github.com/apache/tinkerpop/pull/1038#discussion_r247516020
##########
File path: gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/connection.js
##########
@@ -69,8 +69,9 @@ class Connection extends EventEmitter {
constructor(url, options) {
super();
+ options = options || {};
Review comment:
I think the safest bet would be to use double assignment, that way is concise and less error prone, dwyt @nivsherf ?
```javascript
this.options = options = options || {};
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services