Skip to content

Commit

Permalink
fix(ber encoding): Fixed unecessary nesting of ParameterContents if u…
Browse files Browse the repository at this point in the history
…sing strong typed ParameterContents
  • Loading branch information
jesperstarkar committed May 3, 2018
1 parent 153eed8 commit 1661251
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ember.js
Original file line number Diff line number Diff line change
Expand Up @@ -1957,7 +1957,7 @@ QualifiedParameter.prototype.setValue = function(value, callback) {
let r = new Root();
let qp = new QualifiedParameter(this.path);
r.addElement(qp);
qp.contents = new ParameterContents(value);
qp.contents = (value instanceof ParameterContents) ? value : new ParameterContents(value);
return r;
}

Expand Down Expand Up @@ -2033,7 +2033,7 @@ Parameter.prototype.setValue = function(value, callback) {
}

return this.getTreeBranch(undefined, (m) => {
m.contents = new ParameterContents(value);
m.contents = (value instanceof ParameterContents) ? value : new ParameterContents(value);
});
}

Expand Down

0 comments on commit 1661251

Please sign in to comment.