You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by qi...@apache.org on 2021/06/23 06:44:17 UTC
[skywalking-client-js] branch master updated: fix: headers update
null to object (#61)
This is an automated email from the ASF dual-hosted git repository.
qiuxiafan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-client-js.git
The following commit(s) were added to refs/heads/master by this push:
new a73c1d2 fix: headers update null to object (#61)
a73c1d2 is described below
commit a73c1d239351dae872d1b410d849261582f2920f
Author: aoxls <ao...@live.cn>
AuthorDate: Wed Jun 23 14:44:07 2021 +0800
fix: headers update null to object (#61)
Co-authored-by: 李啸 <>
---
src/trace/interceptors/fetch.ts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/trace/interceptors/fetch.ts b/src/trace/interceptors/fetch.ts
index aca37a1..8e4b3ec 100644
--- a/src/trace/interceptors/fetch.ts
+++ b/src/trace/interceptors/fetch.ts
@@ -77,6 +77,8 @@ export default function windowFetch(options: CustomOptionsType, segments: Segmen
if (!args[1]) {
args[1] = {};
+ }
+ if (!args[1].headers) {
args[1].headers = {};
}
args[1].headers['sw8'] = values;