2
0
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:
Richard Kořínek
2022-10-06 21:01:37 +02:00
committed by GitHub
parent 7a06a3616f
commit d701c7b591
+1 -1
View File
@@ -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);
}
/**