From 7a21f949bcff059a756ebe1092ba3de6281c9822 Mon Sep 17 00:00:00 2001 From: aliaszz <79852394@qq.com> Date: Tue, 7 Dec 2021 18:03:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20XMLHttpRequest=20open=20=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=80=8F=E4=BC=A0=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/probe/ajaxerr.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 6629192..65aac7c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "csijs", - "version": "1.0.9", + "version": "1.0.10", "description": "csijs是一个前端日志系统,它将错误信息记录于本地localStorage中。无任何依赖、无入侵性。", "main": "./dist/csijs.es.js", "directories": { diff --git a/src/probe/ajaxerr.js b/src/probe/ajaxerr.js index 873320d..a163551 100644 --- a/src/probe/ajaxerr.js +++ b/src/probe/ajaxerr.js @@ -7,9 +7,9 @@ const AjaxErr = function (forms) { AjaxErr.prototype.probe = function () { const that = this; const { open } = XMLHttpRequest.prototype; - XMLHttpRequest.prototype.open = (...args) => { - that.addListener(this, args); - open.apply(this, args); + XMLHttpRequest.prototype.open = function() { + that.addListener(this, arguments); + open.apply(this, arguments); }; };