json-machete 0.7.7 → 0.7.8-alpha-59619cd02.0
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/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -357,7 +357,7 @@ function getCwd(path) {
|
|
|
357
357
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
358
358
|
async function dereferenceObject(obj, { cwd = process.cwd(), externalFileCache = new Map(), refMap = new Map(), root = obj, fetch = crossUndiciFetch.fetch, headers, } = {}) {
|
|
359
359
|
var _a;
|
|
360
|
-
if (typeof obj === 'object') {
|
|
360
|
+
if (obj != null && typeof obj === 'object') {
|
|
361
361
|
if (isRefObject(obj)) {
|
|
362
362
|
const $ref = obj.$ref;
|
|
363
363
|
if (refMap.has($ref)) {
|
package/index.mjs
CHANGED
|
@@ -352,7 +352,7 @@ function getCwd(path$1) {
|
|
|
352
352
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
353
353
|
async function dereferenceObject(obj, { cwd = process.cwd(), externalFileCache = new Map(), refMap = new Map(), root = obj, fetch: fetch$1 = fetch, headers, } = {}) {
|
|
354
354
|
var _a;
|
|
355
|
-
if (typeof obj === 'object') {
|
|
355
|
+
if (obj != null && typeof obj === 'object') {
|
|
356
356
|
if (isRefObject(obj)) {
|
|
357
357
|
const $ref = obj.$ref;
|
|
358
358
|
if (refMap.has($ref)) {
|