From 6c475520778434c98774e0379d53a11611852dea Mon Sep 17 00:00:00 2001 From: Ashley Williams Date: Mon, 3 Jun 2019 16:13:20 +0100 Subject: [PATCH] Correctly clone existing active context --- context.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context.js b/context.js index e8c017b..2f8f55f 100644 --- a/context.js +++ b/context.js @@ -69,7 +69,7 @@ Namespace.prototype.get = function get(key) { Namespace.prototype.createContext = function createContext() { // Prototype inherit existing context if created a new child context within existing context. - let context = Object.create(this.active ? this.active : Object.prototype); + const context = this.active ? Object.assign({}, this.active) : {}; context._ns_name = this.name; context.id = currentUid;