@rjsf/utils 5.23.0 → 5.23.2

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.
package/dist/utils.esm.js CHANGED
@@ -1,12 +1,15 @@
1
1
  // src/isObject.ts
2
2
  function isObject(thing) {
3
- if (typeof File !== "undefined" && thing instanceof File) {
3
+ if (typeof thing !== "object" || thing === null) {
4
4
  return false;
5
5
  }
6
- if (typeof Date !== "undefined" && thing instanceof Date) {
6
+ if (typeof thing.lastModified === "number" && typeof File !== "undefined" && thing instanceof File) {
7
7
  return false;
8
8
  }
9
- return typeof thing === "object" && thing !== null && !Array.isArray(thing);
9
+ if (typeof thing.getMonth === "function" && typeof Date !== "undefined" && thing instanceof Date) {
10
+ return false;
11
+ }
12
+ return !Array.isArray(thing);
10
13
  }
11
14
 
12
15
  // src/allowAdditionalItems.ts