doc-detective-common 3.4.1-dev.1 → 3.4.1-dev.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/package.json +1 -1
- package/src/resolvePaths.js +5 -0
package/package.json
CHANGED
package/src/resolvePaths.js
CHANGED
|
@@ -140,6 +140,11 @@ async function resolvePaths({
|
|
|
140
140
|
pathProperties = specPaths;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
+
// If the object is null or empty, return it as is
|
|
144
|
+
if (object === null || Object.keys(object).length === 0) {
|
|
145
|
+
return object;
|
|
146
|
+
}
|
|
147
|
+
|
|
143
148
|
for (const property of Object.keys(object)) {
|
|
144
149
|
// If the property is an array, recursively call resolvePaths for each item in the array
|
|
145
150
|
if (Array.isArray(object[property])) {
|