oas 18.2.2 → 18.2.3

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.
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
3
  function cloneObject(obj) {
4
+ if (typeof obj === 'undefined') {
5
+ return undefined;
6
+ }
4
7
  return JSON.parse(JSON.stringify(obj));
5
8
  }
6
9
  exports["default"] = cloneObject;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oas",
3
- "version": "18.2.2",
3
+ "version": "18.2.3",
4
4
  "description": "Working with OpenAPI definitions is hard. This makes it easier.",
5
5
  "license": "MIT",
6
6
  "author": "ReadMe <support@readme.io> (https://readme.com)",
@@ -1,3 +1,7 @@
1
1
  export default function cloneObject<T>(obj: T): T {
2
+ if (typeof obj === 'undefined') {
3
+ return undefined;
4
+ }
5
+
2
6
  return JSON.parse(JSON.stringify(obj));
3
7
  }