Skip to content

Commit

Permalink
fix constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
icebob committed Oct 11, 2023
1 parent 8178ad7 commit ba43b81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class Context {
* @returns {Context}
*/
copy(ep) {
const newCtx = this.constructor(this.broker);
const newCtx = new this.constructor(this.broker);

newCtx.nodeID = this.nodeID;
newCtx.setEndpoint(ep || this.endpoint);
Expand Down

0 comments on commit ba43b81

Please sign in to comment.