@digitalbazaar/oid4-client 5.7.0 → 5.7.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.
@@ -404,6 +404,14 @@ function _primitiveValueToFilter(value) {
404
404
  type: typeof value
405
405
  };
406
406
  if(VALUE_TYPES.has(filter.type)) {
407
+ /* The `QueryByExample` query language uses the empty string as a
408
+ "wildcard" to request any value for a given property. Therefore, the empty
409
+ string is given special treatment here to match these semantics when
410
+ converting to PE. This is done by omitting the `const` constraint as it
411
+ would erroneously cause an equality check against the empty string. */
412
+ if(filter.type === 'string' && value === '') {
413
+ return filter;
414
+ }
407
415
  filter.const = value;
408
416
  } else {
409
417
  // default to `object`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalbazaar/oid4-client",
3
- "version": "5.7.0",
3
+ "version": "5.7.2",
4
4
  "description": "An OID4 (VC + VP) client",
5
5
  "homepage": "https://github.com/digitalbazaar/oid4-client",
6
6
  "author": {