@base-web-kits/base-tools-web 1.1.8 → 1.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1836,11 +1836,12 @@ var baseToolsWeb = (() => {
1836
1836
  const isObjectData = isPlainObject(data);
1837
1837
  const isArrayData = !isObjectData && Array.isArray(data);
1838
1838
  const fillData = isObjectData ? pickBy(data, (val) => val !== void 0) : data;
1839
- const fillHeader = header ? pickBy(header, (val) => !!val) : {};
1839
+ const emptyValue = [void 0, null, ""];
1840
+ const fillHeader = header ? pickBy(header, (val) => !emptyValue.includes(val)) : {};
1840
1841
  const contentTypeKey = Object.keys(fillHeader).find(
1841
1842
  (k) => k.toLowerCase() === "content-type"
1842
1843
  );
1843
- const contentType = contentTypeKey ? fillHeader[contentTypeKey].toLowerCase() : "";
1844
+ const contentType = contentTypeKey ? String(fillHeader[contentTypeKey]).toLowerCase() : "";
1844
1845
  if (!isGet && fillData && (isObjectData || isArrayData) && !contentType) {
1845
1846
  fillHeader["Content-Type"] = "application/json";
1846
1847
  }