Oh, yeah, that's the right example. And you're correct.
`prefs.get("enabled")` will return undefined unless a default has been set
via `definePreference`


On Wed, May 7, 2014 at 4:44 PM, Miguel Castillo @manchagnu <
notifications@github.com> wrote:

> In src/themes/SettingsManager.js:
>
> > +                result[key.substr(pathLength)] = value;
> > +            }
> > +        });
> > +    };
> > +
> > +    Settings.reset = function() {
> > +        Settings.setValue("theme",  DefaultSettings.theme);
> > +        Settings.setValue("fontSize", DefaultSettings.fontSize + "px");
> > +        Settings.setValue("lineHeight", DefaultSettings.lineHeight);
> > +        Settings.setValue("fontType", DefaultSettings.fontType);
> > +        Settings.setValue("customScrollbars", DefaultSettings.customScrollbars);
> > +    };
> > +
> > +
> > +    function init() {
> > +        return PreferencesManager.ready.then(function() {
>
> So, if enabled has never been defined before, prefs.get("enabled") is
> going to return undefined.
>
>
> https://github.com/mackenza/brackets-kitchen-sink/blob/ee68d173d6e0b4ba687cb2ffa62c1ace3dbc5250/main.js#L108
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/adobe/brackets/pull/7616/files#r12401425>
> .
>