mirror of
https://github.com/tenrok/axios.git
synced 2026-05-30 15:24:11 +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);
|
||||
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