From fe54d4fab58c41440e2188cd7969f61d40dfb95d Mon Sep 17 00:00:00 2001
From: Alexey Lunin <alexey.lunin0@gmail.com>
Date: Tue, 26 Feb 2019 15:39:42 +0400
Subject: [PATCH] fix merge config params

---
 main.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/main.go b/main.go
index 3ed20e5..83c1917 100644
--- a/main.go
+++ b/main.go
@@ -136,7 +136,7 @@ func buildViamAPI() string {
 				result += "\n"
 			}
 
-			result += "    }, merge(this.config, config));\n" +
+			result += "    }, merge({}, this.config, config));\n" +
 				"};\n\n"
 		} else {
 			splits := strings.Split(url, "/")
@@ -151,7 +151,7 @@ func buildViamAPI() string {
 			methodStr := splits[len(splits)-1]
 
 			result += "ViamAPI.prototype." + packageStr + strings.Title(methodStr) + " = function(config, data) {\n" +
-				"    return axios.post(window.API_HOST + '" + packageStr + "/" + methodStr + "', data, merge(this.config, config));\n" +
+				"    return axios.post(window.API_HOST + '" + packageStr + "/" + methodStr + "', data, merge({}, this.config, config));\n" +
 				"};\n\n"
 		}
 	}
-- 
GitLab