I think the undefined is required to keep $.extend from overriding that value. If I recall correctly, using null will result in the resulting object having null whereas undefined is ignored.

From: Nick Schonning [mailto:notifications@github.com]
Sent: Friday, March 15, 2013 06:39 PM Eastern Standard Time
To: wet-boew/wet-boew <wet-boew@noreply.github.com>
Cc: Jackson, Paul
Subject: Re: [wet-boew] Feature geomap (#1539)


In src/js/workers/geomap.js:

> +                                     fractionalZoom: true,
> +                                     theme: null
> +                             },
> +                             overlays: [],
> +                             features: [],
> +                             tables: [],
> +                             useScaleLine: false,
> +                             useMousePosition: false,
> +                             debug: false,
> +                             useLegend: false,
> +                             useTab: false
> +                     };
> +
> +                     // Class-based overrides - use undefined where no override of defaults or settings.js should occur
> +                     overrides = {
> +                             useScaleLine: elm.hasClass('scaleline') ? true : undefined,


An object can be assigned undefined, only null

—
Reply to this email directly or view it on GitHub<https://github.com/wet-boew/wet-boew/pull/1539/files#r3400825>.