Skip to content

productionTime getter throws for projects not in production #2

Description

@robireton

REDCap returns production_time: "" for development-mode projects, and REDCapDatetime.parse throws a TypeError on anything that isn't exactly 19 characters (lib/datetime.js:24). So reading project.info.productionTime (lib/info.js:72-74) crashes instead of returning null like the other empty-string getters in this class. creationTime has the same exposure if the field is ever empty.

Fix: return null when the underlying value is an empty string.

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions