json-fs-query 1.0.3 → 1.0.4
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/browser/jsonFsQuery.js
CHANGED
|
@@ -1390,6 +1390,13 @@
|
|
|
1390
1390
|
// was actually parsed - silently discarding every join clause whenever the query had no WHERE.
|
|
1391
1391
|
return parsed
|
|
1392
1392
|
}
|
|
1393
|
+
if (!joinClauses.length) {
|
|
1394
|
+
// A WHERE condition DID index entity's own rows above, but this query has no join at all -
|
|
1395
|
+
// joinEntity is undefined. The loop below writes dataSets[entity][anEntity][joinEntity]
|
|
1396
|
+
// unconditionally; left unguarded, that assigns a literal "undefined" key (object[undefined]
|
|
1397
|
+
// coerces to the string "undefined") onto every row, since there's no join to actually attach.
|
|
1398
|
+
return parsed
|
|
1399
|
+
}
|
|
1393
1400
|
for (const anEntity in dataSets[entity]) {
|
|
1394
1401
|
const currentEntity = dataSets[entity][anEntity]
|
|
1395
1402
|
// Loop over each of the main entities
|