Skip to content

Ignores the cache if required field exists but is falsy #14

Description

@wildhart

The return value of _getField() is usually defined by:

		if (!doc[field[i]]) {
			return; // === undefined
		}

and then the existance of the field is determined by:

if (typeof _getField(cache, item) === "undefined") {
  innocent = false;
}}

This will cause the cache to be missed if a required field exists but is falsy. E.g.:

doc = {admin: false}; // or null fails as well
field = 'admin';
_getField(doc, field); // undefined, the cache will be ignored :-(

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions