vConsole icon indicating copy to clipboard operation
vConsole copied to clipboard

window.fetch 第二个参数是可选的。3.4.0版本覆盖系统window.fetch后,第二个参数变成必选,导致报错

Open morrain opened this issue 5 years ago • 3 comments

let prevFetch = (input, **init**) => {
  let id = that.getUniqueID();
  that.reqList[id] = {};
  let item = that.reqList[id] || {};
  let query = [],
      url = '',
      method = 'GET',
      requestHeader = null;
  
  // handle `input` content
  if (tool.isString(input)) { // when `input` is a string
    method = init.method || 'GET';
    url = input;
    requestHeader = init.headers;
  } else { // when `input` is a `Request` object
    method = input.method || 'GET';
    url = input.url;
    requestHeader = input.headers;
  }

morrain avatar Mar 11 '21 02:03 morrain

+1.

liushengxian avatar Apr 06 '21 14:04 liushengxian

+1

luoquanquan avatar Apr 19 '21 09:04 luoquanquan

谢谢反馈,3.4.1已经修复。

Maizify avatar Apr 27 '21 11:04 Maizify