Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Error thrown for getBoolean when fragment does not yet exist. #118

@ctrlplusb

Description

@ctrlplusb
  getBoolean: function(name) {
    var fragment = this.get(name);
    return fragment.value && (fragment.value.toLowerCase() == 'yes' || fragment.value.toLowerCase() == 'on' || fragment.value.toLowerCase() == 'true');
  },

Need to check if fragment is not null?

I had a "Select" type with yes/no, and I show default text of "no". User's then don't select "yes" assuming the value is "no" and then when I try to interpret the value I get the following error:

TypeError: Cannot read property 'value' of null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions