mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Improved plain object checking (#5036)
This commit is contained in:
+1
-1
@@ -132,7 +132,7 @@ const isPlainObject = (val) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const prototype = getPrototypeOf(val);
|
const prototype = getPrototypeOf(val);
|
||||||
return prototype === null || prototype === Object.prototype;
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user